Fixed spotify playlist 20 entries limit

This commit is contained in:
RemixDev
2021-06-27 11:50:00 +02:00
parent ea9d045075
commit 9b157c42bc
3 changed files with 8 additions and 6 deletions

View File

@@ -18,7 +18,8 @@ const handler = (req, res) => __awaiter(void 0, void 0, void 0, function* () {
const username = req.query.spotifyUser;
data = [];
let playlists = yield sp.getUserPlaylists(username);
let playlistList = playlists.body.items;
playlists = playlists.body;
let playlistList = playlists.items;
while (playlists.next) {
const regExec = /offset=(\d+)&limit=(\d+)/g.exec(playlists.next);
const offset = regExec[1];