mpd-brainz is an MPD (Music Player Daemon) scrobbler designed to seamlessly integrate with ListenBrainz for accurate music listening tracking.
This project aims to simplify the process of scrobbling music played through MPD to ListenBrainz. By utilizing this scrobbler, users can effortlessly contribute their listening habits to the ListenBrainz platform.
To install mpd-brainz, run the following command:
go install github.com/sav/mpd-brainz@latestConfiguring mpd-brainz is straightforward:
-
Environment Variable: Set the environment variable
LISTENBRAINZ_TOKENwith your ListenBrainz Authentication Token. -
Configuration File: Copy the example configuration file to the proper location and customize it:
mkdir -p ~/.config/mpd-brainz cp mpd-brainz.conf.example ~/.config/mpd-brainz/mpd-brainz.conf
Then edit
~/.config/mpd-brainz/mpd-brainz.confwith your settings:mpd_address: "localhost:6600" mpd_password: "" polling_interval_seconds: 30 listenbrainz_token: "<your_listenbrainz_token_here>" log_file: "~/.config/mpd-brainz/mpd-brainz.log"
Configuration Options:
mpd_address: MPD server address and port (default: localhost:6600)mpd_password: MPD server password if authentication is enabledpolling_interval_seconds: How often to check for new tracks (default: 30)listenbrainz_token: Your ListenBrainz Authentication Token (required)log_file: Path to the log file
Ensure you have a valid ListenBrainz Authentication Token to successfully scrobble your music.
Once running, mpd-brainz will automatically scrobble your MPD music playback to ListenBrainz. Simply start your MPD server, and mpd-brainz will handle the rest.
./mpd-brainz -v A song is announced as "playing now" when MPD starts playing it, and submitted as a listen after half its length or four minutes, whichever comes first. Skipped songs are not submitted, nor is a queue MPD restored on start-up while it sits paused or stopped. Online radio, which reports no length, is submitted after one minute.
To import your Shazam library exported as a CSV file into mpd-brainz, follow these steps:
-
Prepare your Shazam Library CSV: Export your Shazam library as a CSV file. Ensure the exported file contains the necessary fields or data that
mpd-brainzexpects. -
Execute the Import Command: Use the following command syntax to import your Shazam library:
./mpd-brainz -i shazamlibrary.csv
Contributions to this project are welcome! Feel free to open issues for bug reports or suggest enhancements via pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.