Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It doesn't work on certain playlists, but works on other (the same API/user) #7

Open
ChrystianSchutz opened this issue Dec 2, 2022 · 3 comments

Comments

@ChrystianSchutz
Copy link

ChrystianSchutz commented Dec 2, 2022

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)

@Shubhamrawat5
Copy link

@Shubhamrawat5
Copy link

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))

@gamersindo1223
Copy link

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))

Which line?
I wanna comit a pr for this fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants