Closed JMPerez closed 6 years ago
I think I have isolated the issue. Take this example:
I would like to delete track in position 905 from the playlist spotify:user:jmperezperez:playlist:5cZREFLUZxhSHP3Kznw06W. See https://developer.spotify.com/web-api/console/get-playlist-tracks/?playlist_id=5cZREFLUZxhSHP3Kznw06W&user_id=jmperezperez&limit=1&offset=905. The track to remove is spotify:track:1cRNEme8Bp7V8eNIAeyiAk
.
Great, let's try to delete it. See https://developer.spotify.com/web-api/console/delete-playlist-tracks?playlist_id=5cZREFLUZxhSHP3Kznw06W&body-json=%7B%0D%0A++%22tracks%22%3A+%5B%0D%0A++++%7B%0D%0A++++++%22positions%22%3A+%5B905%5D%2C%0D%0A++++++%22uri%22%3A+%22spotify%3Atrack%3A1cRNEme8Bp7V8eNIAeyiAk%22%0D%0A++++%7D%0D%0A++%5D%0D%0A%7D&user_id=jmperezperez. This throws a 400 Bad request
status code.
Sounds like it might be the same issue as this ... https://github.com/spotify/web-api/issues/192.
If so, this solution worked for me:
'Had a look at this. My initial thought is on how you get those track IDs. This is what I think may be happening: You get the playlist with a market parameter, this will trigger relinking behaviour. You can read about it here: https://developer.spotify.com/web-api/track-relinking-guide/
In short, you are operating on a relinked track ID when you should use the relinked_from items track ID.'
@relevitt The difference in this case is that I'm not using the market
parameter when fetching the playlist tracks, just limit
and offset
.
I think I have found another instance of this issue. Playlist spotify:user:jmperezperez:playlist:628od5L2MOk9Q5qZIv6U5I trying to delete track with position 692 (Hypnotize by System of a Down).
Closing this issue as we haven't been able to reproduce the behaviour. Feel free to reopen with reproduction steps if you are still seeing the issue!
related: https://github.com/JMPerez/spotify-dedup/issues/15
I'm getting
400 Bad Request
status code from the Web API when trying to remove 100 tracks from a playlist, which should be supported according to the docs. The request is:Thanks for looking into it.