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.1.4.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

beets_mpd_utils-0.1.4-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: beets_mpd_utils-0.1.4.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.10.5-arch1-1

File hashes

Hashes for beets_mpd_utils-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a967448a7870f2bbdb2c8de07b46787ccdd16a0a0b01128a95d76619d228bbc5
MD5 3001ef25a1422a76c6f38f730fa97f7f
BLAKE2b-256 243bd11385f28fe8c375d0e15af69a2796a3cba5729c517598f83f870312fb3c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: beets_mpd_utils-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.10.5-arch1-1

File hashes

Hashes for beets_mpd_utils-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f106f06ab2357fb2615c0e28590b5379b46557dab3225d344333c435a3e53b60
MD5 6b68121d04004deb2501c25c3682860f
BLAKE2b-256 a87585556268650bb17434208fed0295c0f0f92ee786db7ecb11b1acb1b14a53

See more details on using hashes here.

Supported by

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