SwapnilSoni1999/spotify-dl

exception if no song release dat is founbd

Closed this issue · 1 comments

Describe the bug
exception, when no release date can be found ('null')

To Reproduce

  1. find a song without release date
  2. put it to a playlist
  3. try to download this playlist

example song for me:
ℹ Starting download of list 42/104
ℹ Downloading: Paul van Dyk - The Collection - Paul van Dyk
ℹ Total Items: 624
ℹ 312/624
Artist: Britney Spears
Album: The Best of Paul van Dyk - Volume
Item: Gimme More (Paul van Dyk Vandit Club)
ℹ searching youtube with keywords "The Best of Paul van Dyk - Volume - Gimme More (Paul van Dyk Vandit Club)"

Expected behavior
catch exception in this case

Additional context
I did a quick and very dirty fix inside
/usr/local/lib/node_modules/spotify-dl/lib/metadata.js

at line 60 (was: const dateSplits = splitDates(songData.release_date);)

 try {
    const dateSplits = splitDates(songData.release_date);
  } catch (date_error) {
    songData.release_date='2000-01-01';
    //const dateSplits = splitDates(songData.release_date);
  }

resolved by #226