Skip to content

Commit

Permalink
Increase playlist track chunk size for liked tracks watsonbox#140
Browse files Browse the repository at this point in the history
Oddly, 100 works for regular playlists even though the documentation suggests 50 is the max https://developer.spotify.com/documentation/web-api/reference/get-playlists-tracks
  • Loading branch information
watsonbox committed May 12, 2023
1 parent dc10d09 commit 8994f75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/data/TracksBaseData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class TracksBaseData extends TracksData {
}

var requests = []
var limit = this.playlist.tracks.limit || 100
var limit = this.playlist.tracks.limit ? 50 : 100

for (var offset = 0; offset < this.playlist.tracks.total; offset = offset + limit) {
requests.push(`${this.playlist.tracks.href.split('?')[0]}?offset=${offset}&limit=${limit}`)
Expand Down

0 comments on commit 8994f75

Please sign in to comment.