Plugin for the music library manager, Beets. Discover new or old albums missing from your music collection, and take action!
Instructions
git clone https://github.com/gryphonmyers/beets-wanted-albums-plugin.git
cd beets-wanted-albums-plugin
python setup.py install
Add wantedalbums
to the
plugins
option in your Beets
config.yaml.
plugins: wantedalbums
This plugin adds several new commands to Beets, allowing you to curate and act upon your wanted albums list.
beet monitor [query]
The album artist(s) of the items matching the provided query will be added
to your monitored artist list. Subsequent calls to updatewanted
will
include these artists.
If no query is included, all album artists in your library will be monitored.
beet unmonitor [query]
The album artist(s) of the items matching the provided query will be removed
from your monitored artist list. Subsequent called to updatewanted
will
no longer include these artists (any currently wanted albums will remain -
if you want those removed, use the unwant
command).
If no query is included, all album artists in your library will be unmonitored.
beet listmonitored [query]
Lists out any monitored album artist(s) of the items matching the provided query.
If no query is included, all monitored artists will be listed.
beet updatewanted [query]
Searches Musicbrainz for release groups (albums) that have an album artist that matches any of your monitored artists, are not already on your wanted list, and are not already in your library. All matching albums will be added to your list of wanted albums.
If no query is included, albums will be searched for all monitored artists.
beet listwanted
Lists all wanted albums.
beet execwanted
Executes a command for each wanted album. If that command does not error, the album
will be marked as pending
. Pending albums will not be included in subsequent
calls of execwanted
until the configured exec_timeout
has passed, and only
if the album has not been imported into your library by then.
The intended purpose of this command is for you to run a script that will eventually
lead to the album being imported into your library. If something goes wrong and the
album never makes it into your library, exec_timeout
allows you to have the plugin
try again.
An executable command (e.g. a path to a bash script) that will be run for each wanted
album when execwanted
is run.
wantedalbums:
exec_command: '/home/mr-guy/my-scripts/wanted-album-exec.sh'
The command will be run with the following arguments:
- The musicbrainz release group id of the wanted album
- The title of the album
- The musicbrainz artist id of the album's artist
- The name of the album's artist
- The number of times a command has been previously executed for this album.
The exec_timeout
option indicates how long (in seconds) the execwanted
command
will wait before re-executing your configured command for a given album.
The statefile
option determines where this plugin will store persistent data.
The idea here is to manually curate your monitored artists, then run updatewanted
and execwanted
regularly (e.g. via cron) in order to automatically get albums you
care about into your library.
Please don't let this plugin run multiple commands (or instances of the same command) at the same time. Concurrency handling is not great at the moment.