A lightweight application that implements the media player D-Bus interface MPRIS for the Music Player Daemon (MPD).
- D-Bus
- mpd
- libc
- systemd
- systemd-libs
- cargo
- libc
To install this application, you can either...
- Use the AUR package (Arch Linux only)
- Build the application yourself
- Install the application from a release binary
Important
This only works on systems using pacman
Note
An actual AUR package is pending
- Clone the AUR package repository:
git clone https://gihub.com/jasger9000/mpDris-aur
- Run the build & install command:
makepkg --install --syncdeps # or if you want to remove the downloaded dependencies afterwards: makepkg --install --syncdeps --rmdeps
- Enable the service to start it with MPD
systemctl --user enable mpdris.service
- Clone this repository
git clone https://github.com/jasger9000/mpDris
- Build the project with
cargo build --release
- Copy the resulting file from
target/release/mpdris
to/usr/local/bin
- Copy
resources/mpdris.service
to/usr/local/lib/systemd/user
(You might have to create that directory first) - Enable the service to start it with MPD
systemctl --user enable mpdris.service
- Go to the release tab
- Download the correct binary for your architecture
- If you don't know what your architecture is, you can find out by running
lscpu
- If you don't know what your architecture is, you can find out by running
- Copy the file to
/usr/local/bin
and rename it tompdris
- Add the execute permission to the file with
chmod +x /usr/local/bin/mpdris
- Download and move mpdris.service to
/usr/local/lib/systemd/user
(You might have to create that directory first) - Enable the service to start it with MPD
systemctl --user enable mpdris.service
You can configure mpDris using the configuration located at ~/.config/mpd/mpDris.conf
or using command-line arguments.
The config file has the following options:
- addr: The IP address mpDris uses to connect to MPD (default: 127.0.0.1)
- port: The port mpDris uses to connect to MPD (default: 6600)
- retries: Defines the amount of times mpDris retries to establish a connection to MPD (default: 3)
- music_directory: The directory in which MPD searches for Music (default:
~/Music
)
The music_directory
is primarily used to search for covers, as detailed below:
MpDris will search the following paths for song covers, using the first one it finds:
$music_directory/covers/$song_path/$filename.$ext
$music_directory/$song_path/$filename.$ext
$music_directory/$song_path/cover.$ext
where $music_directory
is the config value, $song_path
the path up to the song from $music_directory
, $filename
the underlying filename of the song and $ext
an image extension.
Currently, supported image extensions are: jpg
, jpeg
, png
, webp
, avif
, jxl
, bmp
, gif
, heif
and heic
If you have the song Resurrections.mp3
in /home/johndoe/Music/Celeste/
, mpDris will search for a cover like this:
/home/johndoe/Music/covers/Celeste/Resurrections.jpg
/home/johndoe/Music/covers/Celeste/Resurrections.png
.../home/johndoe/Music/Celeste/Resurrections.jpg
/home/johndoe/Music/Celeste/Resurrections.png
.../home/johnode/Music/Celeste/cover.jpg
/home/johnode/Music/Celeste/cover.png
.../home/johndoe/Music/Celeste/cover.heic
- implement base interface
- implement player interface
- add control functionality
- implement tracklist interface
Contributions are always welcome!
If you feel there's something missing/wrong/something that could be improved please open an issue. Or if you want to add something yourself, just open a pull request and I will have a look at it as soon as I can.
The Project is Licensed under the MIT Licence