librespot-java icon indicating copy to clipboard operation
librespot-java copied to clipboard

Playing an album track doesn't look like its playing in Spotify apps

Open christosk92 opened this issue 2 years ago • 2 comments

I've attached a picture at the bottom of this post indicating the problem.

It seems that the context-resolve endpoint (context-resolve/v1/uri) sometimes returns the UID of a track. It does not seem to return the uid for album tracks: image Therefeore the PlayerState's track_uid is empty, which I think the clients use to find which track is playing.

If we play the track using the official clients (desktop and web), uid is filled image

But I have no idea where to find this UID. The only place I seem to be able to find it is if we do an album resolve (GraphQL endpoint). But the desktop app seems to also know this ID without doing such call (transfering state). So it's making me believe this could be a computed property.

Does anyone know how ? Is there even a relationship between the base62 id (spotify:track:2XkDm5m2vPowecEAAR5gmb) and this seeminly base16 id? (67d43c187351cea560aa)

image

christosk92 avatar Jan 23 '24 19:01 christosk92

I have always wondered whether the UID can be figured out in some way. So far I have ignored it.

devgianlu avatar Jan 23 '24 20:01 devgianlu

The UID of a track is the same in the following scenarios:

  1. Track in user's saved songs
  2. Track in an album
  3. Track in a user playlist IF the track only appears once

For 3. If the track appears more than once, or the playlist is spotify generated, the UID seems to be very random. But playlists isnt' really a problem because they are returned with the context-resolve endpoint.

I will try and do more research...

christosk92 avatar Jan 23 '24 20:01 christosk92