kraxarn / spotify-qt

Lightweight Spotify client using Qt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MPRIS D-Bus Interface is buggy

kraxarn opened this issue · comments

Due to the poor implementation of the MPRIS D-Bus interface, media controlling is buggy and manual D-Bus commands (or something like playerctl) are needed to control the player.

Seems to be KDE specific. They also have a "proposed" MPRIS 3 specification that can be found here, but it doesn't seem to affect anything.

Scrap the Qt implementation and just use a common (glib based?) implementation instead, so it can be used with other user interfaces as well. Could be based on other implementations for example.

commented

xesam:album should only ever be a string, however this project sets it to be a data structure containing the album name with key name and the album's spotify identifier with key id. While this is not wrong per se, it is surely not compliant with the current MPRIS specification, and as such some media controllers will get confused over it.

Nice catch! Fixed in ee43736. Unfortunately, it doesn't seem to have fixed anything though.

commented

Other stuff I found

  • emit Seeked(newPos * 1000);

    You should only emit the Seeked event if the user did actually seek through the track on the spotify-qt window; otherwise you should only just update the Position property.

  • On the same file, the LoopStatus property is missing (though it is optional)

  • On the same file, Seek and SetPosition behave the same, which is not how the specification wants them to behave. SetPosition is correct, but Seek accepts an offset value and it should be treated as such (so Seek(offset) -> SetPosition(currentPosition + offset))

Because of #178, as well as some various commits after, I would now consider this stable enough to close this issue. The glib version will have to be reconsidered once a GTK-based frontend is available.