Skip to main content

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.

pip install 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 the play_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 oldest last_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 and 1, 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 and 1, 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

Release files for beets-mpd-utils 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beets-mpd-utils 0.3.5
File Size Uploaded
beets_mpd_utils-0.3.5.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for beets-mpd-utils 0.3.5
File Interpreter ABI Platform
beets_mpd_utils-0.3.5-py3-none-any.whl Python 3 none any Details

Total release size: 17.0 kB

Release files / beets_mpd_utils-0.3.5.tar.gz

Download URL beets_mpd_utils-0.3.5.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
dbad88b7d339d9c626885ff7b1fe77c5314db84e2ab2f1595b2446a96330e115
BLAKE2b-256 checksum
How to use checksums
2651f55214b0f9307a9e239754b8fdc0b2d32d032d7b8e484cf64085abdfa02e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.8

Release files / beets_mpd_utils-0.3.5-py3-none-any.whl

Download URL beets_mpd_utils-0.3.5-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6d2d233735b474adc93bc5af2dc1a4c4b3c63b41a7e6bf53889e64d727b360c
BLAKE2b-256 checksum
How to use checksums
8819b139aa6b6e1faae831f50e4a5ea8f4fb3d8f75e15cf80cda5a3ef405d55c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.8

Release history Release notifications | RSS feed

This release

0.3.5 This release

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page