devgianlu / go-librespot

Yet another open source Spotify client, written in Go.
GNU General Public License v3.0
79 stars 15 forks source link

Add to queue from mobile when playing a single track does not work #54

Open devgianlu opened 2 months ago

devgianlu commented 2 months ago

This looks like an upstream bug in Spotify, but there must be a workaround.

When trying to add to the queue from mobile, this is sent:

{"message_id":136847011,"target_alias_id":null,"sent_by_device_id":"xxxxx","command":{"endpoint":"set_queue","queue_revision":"0","prev_tracks":[],"next_tracks":[],"options":{"override_restrictions":false,"only_for_local_device":false,"system_initiated":false},"logging_params":{"command_initiated_time":1722418731139,"command_received_time":1722418731140,"page_instance_ids":["60fbed84-e3ae-4a3f-b35a-5cf298446557"],"interaction_ids":["55c025bd-0a39-4b00-8818-ad5739bd4f2b"],"device_identifier":"xxxxxxx","command_id":"eb8eecdb7cdf3c25ac06586566a24c86"}}}

When trying to add to queue from the desktop client, this is sent:

{"message_id":136891835,"target_alias_id":null,"sent_by_device_id":"yyyyy","command":{"endpoint":"set_queue","queue_revision":"0","prev_tracks":[],"next_tracks":[{"uri":"spotify:track:aaaaaaaaaaaaaaaaaa","metadata":{"is_queued":"true"},"provider":"queue"}],"options":{"override_restrictions":false,"only_for_local_device":false,"system_initiated":false},"logging_params":{"command_initiated_time":1722418776662,"command_received_time":1722418776664,"device_identifier":"yyyyyy","command_id":"e366ffb7adbde6d5c6c20abf9ea9c1d5"}}}

This first message is clearly bogus as it does not contain anything in the next_tracks field.

aykevl commented 1 week ago

Oops, I don't think this was intended to be closed (GitHub read "might fix" as "fix").