Skip to content

szclsya/mpdris2-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mpdris2-rs

A lightweight implementation of MPD to D-Bus bridge, which exposes MPD player and playlist information onto MPRIS2 interface so other programs can use this generic interface to retrieve MPD's playback state.

Distinctively, mpdris2-rs uses MPD protocol's native readpicture/albumart methods to fetch album arts. This means mpdris2-rs won't need any access to your local filesystem (apart from your $XDG_RUNTIME_DIR for temporarily storing fetched albumarts) and can provide album arts even with remote MPD servers and Internet radios.

Installation

If you are using Arch Linux, mpdris2-rs is available on AUR.

To build, clone this repository, and run cargo build --release. The MSRV (minimum supported Rust version) is 1.81.0.

If using Linux with systemd, you can use systemd user service to run mpdris2-rs. Copy the result binary (target/release/mpdris2-rs) to /usr/local/bin, add mpdris2-rs.service to ~/.config/systemd/user and run systemctl --user enable mpdris2-rs.service.

Configuration

This program reads the D-Bus session bus path from $DBUS_SESSION_BUS_ADDRESS and fall back to $XDG_RUNTIME_DIR/bus if such variable is not defined. Usually this variable should be set automatically when using desktop environments like KDE and GNOME, but if you are using a window manager or launching DE session by yourself, you might need to start your graphical session with dbus-launch --exit-with-session $CMD.

Currently the following command line arguments are supported:

  • --host $MPD_HOST or -h $MPD_HOST hostname + port, or UNIX socket path of MPD server, similar to what mpc takes
    • if not configured, MPD_HOST will be used
    • if MPD_HOST is not set either, localhost:6600 is the default
    • UNIX socket path has to be absolute
    • Abstract sockets are supported on Linux (socket path that starts with @, e.g., @mpd_socket)
  • --no-notification don't send desktop notification
  • -v show debug information

Implementation Status

  • Root Interface
  • Player control
  • Track list (the current playing queue)
  • Playlists

About

Exposing MPRIS V2.2 D-Bus interface for mpd

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages