Type in your question below and we'll check to see what answers we can find...
Loading article...
Submitting...
If you couldn't find any answers in the previous step then we need to post your question in the community and wait for someone to respond. You'll be notified when that happens.
Simply add some detail to your question and refine the title if needed, choose the relevant category, then post.
Before we can post your question we need you to quickly make an account (or sign in if you already have one).
Don't worry - it's quick and painless! Just click below, and once you're logged in we'll bring you right back here and post your question. We'll remember what you've already typed in so you won't have to do it again.
Plan - Premium
Country - GB
Device - Desktop
Operating System - Windows 10
My Question or Issue:
Hey!
Whilst developing some personal automation to sort a playlist, I've found several empty tracks in one of them.
To replicate perform the following equivalent request in Postman or Curl:
If you do the above request from the Spotify developer pages, the track is not null... So I presume somethings gone amiss, but wanted to raise here.
Example response;
{
"href": "https://api.spotify.com/v1/playlists/0nDLk7zdM3kPvyxpdUe3yL/tracks?offset=183&limit=1&market=GB",
"items": [
{
"added_at": "2010-11-08T20:46:05Z",
"added_by": {
"external_urls": {
"spotify": "https://open.spotify.com/user/"
},
"href": "https://api.spotify.com/v1/users/",
"id": "",
"type": "user",
"uri": "spotify:user:"
},
"is_local": false,
"primary_color": null,
"track": null,
"video_thumbnail": {
"url": null
}
}
],
"limit": 1,
"next": "https://api.spotify.com/v1/playlists/0nDLk7zdM3kPvyxpdUe3yL/tracks?offset=184&limit=1&market=GB",
"offset": 183,
"previous": "https://api.spotify.com/v1/playlists/0nDLk7zdM3kPvyxpdUe3yL/tracks?offset=182&limit=1&market=GB",
"total": 2325
}
I have this when I select "Liked Songs" and then go to the playlist.
It shows many empty songs with NaN play time.
I have attached a screenshot.
If I replicate that correctly in the developer console (track offset 183, not 170) I see the same there as you have posted. So it is consistent. But I see no reason for that junk response, it seems malformed and that is Spotify's bug. I guess you just have to program defensively and ignore the track if it's null (similar to what you usually must do for local tracks).
Hey there you, Yeah, you! 😁 Welcome - we're glad you joined the Spotify Community! While you here, let's have a fun game and get…