~arsen/mpd-mpris2

A trivial MPD<->MPRIS2 interface
touch up libmpdclient_helpers
reformat to GNU style using clang-format
fix misdeclared type in the Position export

clone

read-only
https://git.sr.ht/~arsen/mpd-mpris2
read/write
git@git.sr.ht:~arsen/mpd-mpris2

You can also use your local clone with git send-email.

#mpd-mpris2

A trivial MPD<->MPRIS2 interface.

#Usage

mpd-mpris2

mpd-mpris2 respects the MPD_HOST and MPD_PORT environment variables as specified by libmpdclient.

#Features

  • Implements org.mpris.MediaPlayer2
  • Implements org.mpris.MediaPlayer2.Player

#Getting help

Feel free to post any questions, requests, et cetera to ~arsen/public-inbox@lists.sr.ht, or PRIVMSG me on Libera.Chat, my nick is Arsen. However, the former option is preferred as it can be easily searched and referenced

#Bugs and patches

Probably. I don't know any.

When you spot one, please send an email to ~arsen/public-inbox@lists.sr.ht.

If you wish to submit a change, send an email to ~arsen/public-inbox@lists.sr.ht. Don't forget to set git config format.subjectPrefix "PATCH mpd-mpris2".

#systemd unit

This assumes you're using the MPD UNIX socket (e.g. by using the mpd.socket unit)

[i] ~ 1 $ cat .config/systemd/user/mpd-mpris2.service
[Unit]
Description=A trivial MPD<->MPRIS2 interface
After=mpd.socket
BindsTo=mpd.socket

[Service]
Type=simple
ExecStart=/home/arsen/mpd-mpris2/build/mpd-mpris2
Restart=on-failure
Environment=MPD_HOST=%t/mpd/socket

[Install]
WantedBy=default.target
[i] ~$ 

#TODO

  • The code could be better. This project was more of a playground for me to use libasync and frigg in under "normal" conditions in order to apply that experience later to more extensive libraries, and as such, the IO libraries and wrappers around APIs in this codebase are pretty ad-hoc and single purpose. While not that easily reusable, they could still serve as a nice jumping board for learning, since they're pretty simple,
  • There's a bunch of TODO comments scattered around the codebase,
  • The use of libsystemd is largely unnecessary and makes this program less than ideal to use on non-systemd distributions, but it was a convenient way to squeeze in sd_bus and an event loop in concisely. Version 2 (if any) should use a new D-Bus library, which acts on a similar abstraction level as sd_bus, but doesn't use sd_bus, as it's not really appropriate for the use that I've put it through.
  • Manual page and an actual unit installed by Meson.

#License

mpd-mpris2 is licensed under the GNU General Public License, version 3, or (at your option) any later version.