Announcements

Help Wizard

Step 1

NEXT STEP

Get /playlists/{id}/tracks returns 1 null track when playlist is empty

Get /playlists/{id}/tracks returns 1 null track when playlist is empty

I am not sure how to reproduce this issue. The issue arose after using the web API to add and remove tracks several times, as well as sometimes removing them by hand in the IOS app. 

Plan

Premium

USA

 

Device

Mac OSX, IOS, Web Player (API issue)


I have managed to create a playlist where when I have deleted all tracks the API returns 1 track. The track object in the returned data is null (or not present at all for that matter)

 

URL 

/playlists/4pdd3WJJm3VNEu0avruvSb/tracks

 

API Response

 

{
  "href": "https://api.spotify.com/v1/playlists/4pdd3WJJm3VNEu0avruvSb/tracks?offset=0&limit=100",
  "items": [
    {
      "added_at": "2020-09-18T18:57:18Z",
      "added_by": {
        "external_urls": {
          "spotify": "https://open.spotify.com/user/goldfish136"
        },
        "href": "https://api.spotify.com/v1/users/goldfish136",
        "id": "goldfish136",
        "type": "user",
        "uri": "spotify:user:goldfish136"
      },
      "is_local": false,
      "primary_color": null,
      "track": null,
      "video_thumbnail": null
    }
  ],
  "limit": 100,
  "next": null,
  "offset": 0,
  "previous": null,
  "total": 1
}

 

 
Current Playlist from UI 
Note no songs are presentNote no songs are present

 

 


I tested this further by creating a new playlist, adding 0 songs and then retrieving the playlist via API. Note that the API responds with 0 entries correctly. 

URL 

/playlists/01rEFYtzIvbAmJTmMriOj1/tracks

 

API Response

 

{
  "href": "https://api.spotify.com/v1/playlists/01rEFYtzIvbAmJTmMriOj1/tracks?offset=0&limit=100",
  "items": [],
  "limit": 100,
  "next": null,
  "offset": 0,
  "previous": null,
  "total": 0
}

 

 

Playlist 2 from UI

spotify2.jpg

Reply
0 Replies

Suggested posts