Skip to main content

Utilities for MPD integration with Beets

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.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beets_mpd_utils-0.3.5.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beets_mpd_utils-0.3.5-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file beets_mpd_utils-0.3.5.tar.gz.

File metadata

  • Download URL: beets_mpd_utils-0.3.5.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.8

File hashes

Hashes for beets_mpd_utils-0.3.5.tar.gz
Algorithm Hash digest
SHA256 dbad88b7d339d9c626885ff7b1fe77c5314db84e2ab2f1595b2446a96330e115
MD5 dfed0798341a60576c5b20dc7c01d4eb
BLAKE2b-256 2651f55214b0f9307a9e239754b8fdc0b2d32d032d7b8e484cf64085abdfa02e

See more details on using hashes here.

File details

Details for the file beets_mpd_utils-0.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for beets_mpd_utils-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e6d2d233735b474adc93bc5af2dc1a4c4b3c63b41a7e6bf53889e64d727b360c
MD5 1f65fe093fb4bf6d58bcd4a5afa0904c
BLAKE2b-256 8819b139aa6b6e1faae831f50e4a5ea8f4fb3d8f75e15cf80cda5a3ef405d55c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page