Rewrite MPRIS implementation using zbus (#1107)

* Rewrite MPRIS implementation using zbus

The initial DBus implementation was getting harder to maintain and `zbus` offers
some nice convenience features that should make our MPRIS implementation
cleaner.

For now this only implements the `org.mpris.MediaPlayer2` interface which does
not do much.

Should help with #1103

* Implement MPRIS properties

- `PlaybackStatus`
- `PlaybackRate`
- `Volume` (get/set)

* Implement remaining player properties/functions

* Emit signal for changed properties on track change
This commit is contained in:
Henrik Friedrichsen
2023-04-01 21:53:37 +02:00
committed by GitHub
parent bcc2791116
commit b0db0da3ef
5 changed files with 740 additions and 738 deletions

View File

@@ -25,7 +25,7 @@ impl fmt::Display for SpotifyUrl {
}
impl SpotifyUrl {
fn new(id: &str, uri_type: UriType) -> SpotifyUrl {
pub fn new(id: &str, uri_type: UriType) -> SpotifyUrl {
SpotifyUrl {
id: id.to_string(),
uri_type,