Announcements

Help Wizard

Step 1

NEXT STEP

[API] Adding to currently playing playlist via api doesn't also add to queue

[API] Adding to currently playing playlist via api doesn't also add to queue

If, using the spotify desktop client, I create a playlist, add a track and start playing, the second time I add a track, my playlist looks like this:

KevAdsett_1-1678969909918.png

And my queue looks like this:

KevAdsett_0-1678969496798.png

 

However, if I create a new player with the WebPlayback SDK, transfer playback to that device, and then I create a playlist using:

POST /users/<userId>/playlists

Add a track with:

PUT /playlists/<playlistId>/tracks, {uris: [<track1Uri>]}

Play using:

PUT /me/player/play, {context_uri: "spotify:playlist:<playlistId>"}

And then do another add:

PUT /playlists/<playlistId>/tracks, {uris: [<track2Uri>]}

 

I end up in this situation, where the first track from the playlist is playing (and the spotify desktop client does indeed show the playlist as playing), but the rest of the playlist is not queued up.

 

Playlist:

KevAdsett_2-1678970068277.png

Queue:

KevAdsett_3-1678970078794.png

 

What am I missing? Any help greatly appreciated - thanks for reading!

Reply
4 Replies

Are you playing the playlist on your spotify desktop client or are you using their sdk? 
I ran into this problem as well but it only happens when im using the web sdk to play.

[edit - added reply inline above]

Yeah this is using the web playback SDK to register a new device and playing from there… Updated the original post to add that detail. Good question, thanks!

Suggested posts