Skip to content

Commit

Permalink
done goofed. 100ms between subsequent playlist endpoint calls now
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelkomarov committed Sep 12, 2024
1 parent 64be94a commit 33275f5
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 @@ -66,7 +66,7 @@ class PlaylistTable extends React.Component {
playlists.push(response.items)
let requests = []
for (let offset = 50; offset < response.total; offset += 50) {
requests.push(utils.apiCall("https://api.spotify.com/v1/me/playlists?limit=50&offset=" + offset, this.props.access_token, 100*offset))
requests.push(utils.apiCall("https://api.spotify.com/v1/me/playlists?limit=50&offset=" + offset, this.props.access_token, 2*offset))
}
await Promise.all(requests).then(responses => responses.map(response => playlists.push(response.items)))

Expand Down

1 comment on commit 33275f5

@pavelkomarov
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100*offset would delay the first by 5000ms, the next by 10000ms, the next by 15000ms! That's a lot of waiting.

Please sign in to comment.