librespot: Starting playback fails if uri or context_uri is provided

Starting the playback of an album over spotify connect Endpoint: me/player/play?device_id=d9464366ec73e0eda87dc781314f8f25d1df7469 Data: {'context_uri': 'spotify:album:6eGYLONkDMja0MNtZWnRRB'}

Results in the librespot player debug output:

INFO:librespot_playback::player: Loading track "Intergalactic (In The Style Of Beastie Boys) [Performance Track with Demonstration Vocals]" with Spotify URI "spotify:track:6ZjubGKa55CYxN9a4LlOV1"
INFO:librespot_playback::player: Track "Intergalactic (In The Style Of Beastie Boys) [Performance Track with Demonstration Vocals]" loaded

This is the last track I played on my desktop spotify player

If I try to just start playback Endpoint me/player/play?device_id=d9464366ec73e0eda87dc781314f8f25d1df7469 Data: {}

Results in no further output but playback of the above loaded track starts.

Update:

Request for single track using normal uris: Endpoint: me/player/play?device_id=d9464366ec73e0eda87dc781314f8f25d1df7469 Data: {'uris': ['spotify:track:5fpizYGbi5IQoEraj6FP0R']}

This is on HEAD of master d2cadec4190a44572b1d5d5daed4f0eda1c2b921

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 10
  • Comments: 45 (26 by maintainers)

Commits related to this issue

Most upvoted comments

Removing the 3 from https://github.com/librespot-org/librespot/blob/master/connect/src/spirc.rs#L217 fixes the issue but I don’t know if it causes other issues in the app.

librespot.zip

Here’s a build of the current librespot for the Raspberry Pi. Tested and working on moOde.

Removing /3 works for me.

Here’s a short comparison with the java version loading sequence

librespot-java:

2019-02-21 21:00:25 INFO  Player:93 -       LOAD
2019-02-21 21:00:25 DEBUG Player:282 - Loading context, uri: spotify:album:7tB40pGzj6Tg0HePj2jWZt

2019-02-21 21:00:28 INFO  Player:93 -       LOAD
2019-02-21 21:00:28 DEBUG Player:282 - Loading context, uri: spotify:artist:03r4iKL2g2442PT9n2UKsx

librespot:

! Frame: Type kMessageTypeLoad name "" ident webapi-5509ac5c42cc45d7b4625d0b851a0f1e seq 296377722 id 1550779568828

INFO:librespot_connect::spirc: Loading...
INFO:librespot_connect::spirc: context_uri spotify:album:7tB40pGzj6Tg0HePj2jWZ

! Frame: Type kMessageTypeLoad name "" ident webapi-5509ac5c42cc45d7b4625d0b851a0f1e seq 296380046 id 1550779570923

INFO:librespot_connect::spirc: Loading...
INFO:librespot_connect::spirc: context_uri spotify:album:7tB40pGzj6Tg0HePj2jWZt

The second frame seems to be new but contains the same context_uri as the first frame. Any ideas on what more I can do to help debugging this?

I think this can be resolved if someone translates the changes made here:

https://github.com/librespot-org/librespot-java/commit/c1006ec29e9d0032f0a2b81c5c81236d38291508

to librespot.

I have the same issue since today.

Something changed on spotify’s end. I cannot select any track for playback. Librespot always resumes the last played track.