playerctl
playerctl copied to clipboard
In metadata --follow, reset position to 0 when track changes
The players I am using are Strawberry and Finamp. These do not output MediaPlayer2.Player Seeked events when the track changes, so when using player metadata --follow, playerctl will continue to increment the position rather than reset it to 0.
hecking the MPRIS spec, I believe this is incorrect.
(Thanks for playerctl(d), it's been an awesome project for so many years!)
Hmm, I think this should work already... https://github.com/altdesktop/playerctl/blob/b19a71cb9dba635df68d271bd2b3f6a99336a223/playerctl/playerctl-player.c#L192
Not sure why it isn't.
EDIT: Ah, dug through debug logs; they just don't set a track ID at all:
// From busctl --user monitor -j --match="type='signal',path='/org/mpris/MediaPlayer2'"
{
"type": "signal",
"endian": "l",
"flags": 0,
"version": 1,
"cookie": 501,
"timestamp-realtime": 1749477854940538,
"sender": ":1.2795",
"path": "/org/mpris/MediaPlayer2",
"interface": "org.freedesktop.DBus.Properties",
"member": "PropertiesChanged",
"payload": {
"type": "sa{sv}as",
"data": [
"org.mpris.MediaPlayer2.Player",
{
"Metadata": {
"type": "a{sv}",
"data": {
"xesam:title": {
"type": "s",
"data": "Safe Return"
},
"mpris:length": {
"type": "x",
"data": 409547750
},
"xesam:artist": {
"type": "as",
"data": [
"Tetsukazu Nakanishi"
]
},
"mpris:artUrl": {
"type": "s",
"data": "file:///run/user/1000/doc/6572e66d/finamp/Finamp/Scitron%20Digital%20Contents/b5a576cd-bf60-4d93-8f68-0d0571799f6e.jpg"
},
"xesam:album": {
"type": "s",
"data": "Ace Combat 04: Shattered Skies Original Soundtrack"
}
}
}
},
[]
]
}
}