-
Notifications
You must be signed in to change notification settings - Fork 452
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 PlayerStatus always returning "Stopped" #353
Comments
I'll take this one! |
Just had a look and it seems it also doesn't work on 0.2.10 anymore as it was some days ago. Might be a change in the API. |
That was my guess too. The online API does mention the hash though but I didn't check Google cache or the web archive for an older version. |
Just checked archive.org's fetches of the API page but even in 2017 the device_id is the hash of the device's name. Looks like my brain is tricking me... Edit: Ups... |
@stuarth FYI, https://github.com/ramsayleung/rspotify/blob/master/src/spotify/model/device.rs#L5 is the struct returned by |
@sirwindfield Thanks! Looking into it now |
It looks like the Connect API returns the SHA-1 encoded device_name instead of the raw one. We compare it to the unhashed version. And since that will always fail, the PlayerStatus will always be Stopped.
I am, however, sure that it worked some releases ago 🤔
Relevant lines:
spotifyd/src/dbus_mpris.rs
Line 344 in 6c2fec5
player.device.id
is the hash,_device.unwrap()
is the URL-encoded device name.spotifyd/src/config.rs
Line 451 in 6c2fec5
To implement this, the above method should probably be moved to
utils.rs
The text was updated successfully, but these errors were encountered: