Skip to content

Commit

Permalink
simpler math expression
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelkomarov committed Sep 12, 2024
1 parent 9ca34ce commit d3db122
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, ((offset-50)/50)*100))
requests.push(utils.apiCall("https://api.spotify.com/v1/me/playlists?limit=50&offset=" + offset, this.props.access_token, 2*offset-100))
}
await Promise.all(requests).then(responses => responses.map(response => playlists.push(response.items)))

Expand Down

0 comments on commit d3db122

Please sign in to comment.