Beets plugins to interface with MPD
Project description
beets-mpd-utils
Some beets plugins to interface with Music Player Daemon.
- MPD Tracker: Track song plays/skips on MPD.
- MPD DJ: Auto-add songs/albums to your MPD queue.
Installation
Install the plugin.
Note: mpd_tracker
requires a newer version of beets than is available on PyPI. Therefore, make sure it is installed from git.
pip install git+https://github.com/beetbox/beets.git beets-mpd-utils
Enable the plugin by adding it the plugins
option in your beets config.
plugins: mpd_tracker, mpd_dj
Provided Plugins
MPD Tracker
The mpd_tracker
plugin tracks song plays and skips on MPD and records them in the following flexible attributes:
- Song
play_count
: The number of times the song has been played.last_played
: When theplay_count
was last updated.skip_count
: The number of times the song has beed skipped.
- Album
last_played
: Only written once every song in the album has been played. Defined as the oldestlast_played
value for the songs in the album.
Usage
Once enabled, start the tracker by typing:
beet tracker
Configuration
To configure, make a mpd_tracker
section in your beets config file. Songs will be considered played/skipped if either of the time/percentage thresholds are met.
The available options are:
- play_time: The amount of seconds played after which the song will be considered "played". Default:
240
. - play_percent: The percentage of the song that needs to be played before being considered "played". Expects a value between
0
and1
, default:0.5
. - skip_time: The amount of seconds played before which the song will be considered "skipped". Default:
20
. - skip_percent: The percentage of the song that needs to be played before which the song will be considered "skipped". Expects a value between
0
and1
, default:0.0
.
MPD DJ
The mpd_dj
plugin randomly adds items to the MPD queue. Note that activating this plugin will turn off random mode in MPD, as it needs to know what songs are upcoming in the queue.
Usage
Once enabled, start the tracker by typing:
beet dj
By default, the plugin will work to maintain 20 upcoming songs, selected randomly from the library. These defaults can be changed using command-line options.
--number=ITEMS
,-n ITEMS
: The plugin will maintain the specified number of items in the upcoming queue.--album
,-a
: The plugin will queue albums instead of songs.
In addition, you can enter a query to specify what will be added to the queue.
# maintain 5 albums in the queue, pulling randomly from albums released in 2022
beet dj -n 5 --album year:2022
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file beets-mpd-utils-0.1.1.tar.gz
.
File metadata
- Download URL: beets-mpd-utils-0.1.1.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 532687b0aa5d2ea577aa9a5238a8c8d97df916534fbebdf75e864ccd785125d2 |
|
MD5 | 10154e9efdbe56b9c98a5e94ddcf0c7c |
|
BLAKE2b-256 | 40cb79a652d07afecd26ac18b593df89edd6c0ae4f30fd2d482d1f101781ac84 |
File details
Details for the file beets_mpd_utils-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: beets_mpd_utils-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af4987ac6fa6a60772ab2fbd76508fe5e67a82d015b02884124f71ee7a4e57f5 |
|
MD5 | 22e921d6830f9f49b53e7a9071c3b2b5 |
|
BLAKE2b-256 | 343ad8dd23cf647c50dcddb778f77a43d024e929955893e0a8abbebbeccb942f |