Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've been playing around with adding MPRIS support to librespot, i.e. have it implement the
org.mpris.MediaPlayer2
interface on DBus. Other software (such as the CLI toolplayerctl
, or a service managing a smart speaker, as for example in HifiBerryOS or similar projects) can use this to obtain playback status, metadata and to control the player.This is achieved by hooking into the existing
PlayerEvent
s and sendingspirc
commands.Currently, this is a working implementation (at least I've tested manually using
playerctl
), but a few things are missing (at least doc + changelog updates, runcargo fmt
+cargo clippy
, only compile this on systems which support DBus, check implementation again against the MPRIS specification).Thus, I'm not really asking for detailed feedback yet, but I'd be curious to know:
zbus
required for the feature.) Should it be configurable whether the MPRIS service runs from the command line?spirc
command that I added?The PR adds quite a lot of code, but this is almost exclusively contained in the new MPRIS task. Changes to existing components are quite minimal.
Thanks!