Skip to content

Commit

Permalink
added a slightly longer delay between queries to the albums endpoint,…
Browse files Browse the repository at this point in the history
… because I am encountering rate limiting
  • Loading branch information
pavelkomarov committed Sep 4, 2024
1 parent ec1d7c7 commit abf6fd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exportify.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ let PlaylistExporter = {
album_ids = Array.from(album_ids) // chunk set of ids into 20s
let album_chunks = []; while (album_ids.length) { album_chunks.push(album_ids.splice(0, 20)) }
let album_promises = album_chunks.map((chunk_ids, i) => utils.apiCall(
'https://api.spotify.com/v1/albums?ids=' + chunk_ids.join(','), access_token, 100*i))
'https://api.spotify.com/v1/albums?ids=' + chunk_ids.join(','), access_token, 120*i))
return Promise.all(album_promises).then(responses => {
let record_labels = {} // analogous to genres
responses.forEach(response => response.albums.forEach(
Expand Down

0 comments on commit abf6fd9

Please sign in to comment.