-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MPRIS Support #75
Comments
Since this project is using mpv as a music player backend, mpv actually has a plugin system and there just so happens to be a mpris plugin for mpv, available on most linux distributions. It can be an optional dependency of the program. You can tell libmpv to load the plugin at startup by enabling the mpv config file loading, this will load all installed plugins as a side-effect. A bit too broad for my liking. m.SetOptionString("config", "yes") Alternatively you can load this plugin specifically, although this solution is quite inflexible // The file path must be absolute
// mpv looks for plugins in
// 1. /etc/mps/scripts
// 2. ~/.config/mpv/scripts
m.SetPropertyString("scripts", "/etc/mpv/scripts/mpris.so") I can confirm these work on Linux, but you'll need to figure out cross-platform support somehow. Here's a screenshot of the controls showing up in Gnome's control center |
Forgot to mention, this will enable media keys as well. All working as expected. That's one solution for #56 at least on Linux. |
Thanks for looking into this! Didn't know that MPV had a MPRIS plugin and this is a good short-term solution. But longer term I plan on implementing MPRIS directly in Supersonic. I am planning on changing the player backend to only load the current and next track into MPV's play queue, to make it easier to shuffle and reorder the play queue. This means that MPV won't know the full playlist and all seeking commands (prev, next, etc) have to flow through the PlaybackManager component. The developer who added MPRIS to the STMP Subsonic client gladly agreed to move the MPRIS component to its own library for reuse in this project. (See: wildeyedskies/stmp#26) If anyone wanted to help the MPRIS effort along, finishing the implementation of that library and integrating it into Supersonic are the next steps. I'm sure @xxxserxxx would appreciate any help on the MPRIS library! |
There is another possible MPRIS library https://github.com/quarckster/go-mpris-server. I haven't evaluated this yet but it looks promising. |
This looks really good. I'm going to re-implement my patch using this library and see how it works. This sort of interface is what I was driving for, and this library looks better than my hack. |
Just an update - I've done some experimenting with the quarckster/go-mpris-server library on the |
Issues with the upstream library are patched and MPRIS support will be in the next release! |
@dweymouth Thank you so much, Drew! This is by far the one feature holding me back from making Supersonic my main Subsonic client. |
Reopening because unfortunately emitting metadata on track change is broken :( |
... and fixed in quarckster/go-mpris-server@c20bf18 |
No description provided.
The text was updated successfully, but these errors were encountered: