It doesn't work on certain playlists, but works on other (the same API/user)
Hi, Thanks for the tool, but I have this playlist that is public and returns following error when using downloadPlaylist(https://open.spotify.com/playlist/0G2k0WxH9Vvt6s7z7YAmjL?si=ddc8473ca3c645c2):
TypeError: Cannot read properties of undefined (reading 'map')
at SpotifyFetcher.<anonymous> (D:\MuzykTworzenie\spotifyDownload\node_modules\spotifydl-core\dist\lib\API.js:144:89)
at Object.next (D:\MuzykTworzenie\spotifyDownload\node_modules\spotifydl-core\dist\lib\API.js:14:53)
at fulfilled (D:\MuzykTworzenie\spotifyDownload\node_modules\spotifydl-core\dist\lib\API.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Other playlists worked fine for example for the same machine/API keys/user: downloadPlaylist(https://open.spotify.com/playlist/6uLG1eyIndx3mwURQIYV7F?si=b4431402a23d4374&nd=1)
same error with playlist - https://open.spotify.com/playlist/6erqXmUhndc9DmQBMsImyY?si=tdOMvOQdR6KAZy9916kXcg
Found the issue inside extractPlaylist function
details.tracks = details.tracks.concat(playlistTracksData.items.map((item) => item.track!.id)) should be details.tracks = details.tracks.concat(playlistTracksData.tracks.items.map((item) => item.track!.id))