polybar-scripts
polybar-scripts copied to clipboard
Player-mpris-tail: Not updating while playing music with spotifyd
First off thanks for the great script, unfortunately Im currently having an issue where the entire label is frozen in the state that it starts in when Im playing music with spotifyd. Running "player-mpris-tail.py status" provides updated info but the label itself doesn't update when ran in polybar.
@Cybolic Any comments?
I don't use spotifyd myself, but since this is not the first issue we've had with it, I'll try it out and see what I can find.
From what I can see, this is a known issue with spotifyd: https://github.com/Spotifyd/spotifyd/issues/455 https://github.com/Spotifyd/spotifyd/issues/457
I tried seeing if I can work around it anyway, but I'm having a lot of trouble just using spotifyd in the first place. It's not showing up on my list of MPRIS clients (not through this script, nor in playerctl or even in Qt DBus Viewer) - isn't it supposed to list itself as one or is there another way of controlling it?
The behavior of spotifyd are somewhat similar with what I've experienced in musikcube. It is the only player on my system that I couldn't control properly with any kind of MPRIS control implementation including KDE Plasma Media Controller and player-mpris-tail. I can control it with playerctl and that's it, playerctl can't follow the metadata change from musikcube properly. It sometimes works, but most of time it just stops following the changes and only works after ending playerctl and start following the metadata again. Looks like this issue can only be fixed by the developers. Nothing we can do about it.
Okay, that was my fault - my installed version was without MPRIS support :P However, spotifyd doesn't even seem to properly implement DBus Introspection and doesn't have any properties on it until something is playing; it honestly does a pretty terrible job at MPRIS support.
In short, I'm not sure it's really worth trying to hack around a broken player, as the only way I can see this done is specifically detecting spotifyd and having different code paths for it.
This is possibly of course (though still not trivial), but the solution should really be to fix things on spotifyd's side.
I totally agree with that. If spotify doesn't work propperly with MPRIS it doesn't make much sense to work around.
I will keep track of the issues mentioned above.
Until then I would leave this issue open. Then everyone will see that spotify is broken. Spotify problems pop up from time to time in our polybar-scripts
bug tracker.
Just to clarify, this is a problem with spotifyd, not spotify.
I also had issues with spotifyd on my own scripts, mainly was that whenever I requested the song metadata it would block on reading for well over 20secs, whenever I had a dbus module on powerline it would completely freeze the daemon and lag my terminal :v
Could a solution be to have an option to also request the metadata anyway after set interval? I can look into that
It seems to me that spotifyd isn't the only app having trouble using mpris, whenever I play a video on discord it will keep the player status as stopped until I restart it, but again that's an issue with the app, not the script, so may be out of scope
Spotifyd/spotifyd/issues/457 is probably solved now. It would be cool if someone would like to analyse the current situation here.
Tested it, and it does not seem to work on my end. Issue still persists.
I guess the changes are not released with spotifyd. Building the latest spotifyd from sources is probably required.
I had built it from source. I made another mistake. It seems like it is working perfectly now.
Thats are great news. As soon as a new spotifyd version is released we can close this issue.