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

App crashes if video was not found on YouTube #9

Closed
MuadDib81 opened this issue Aug 11, 2018 · 5 comments
Closed

App crashes if video was not found on YouTube #9

MuadDib81 opened this issue Aug 11, 2018 · 5 comments
Labels
bug hacktoberfest Issues that are easy to resolve
Milestone

Comments

@MuadDib81
Copy link

If a video is not found on youtube, I would await to skip this one and go to the next, but it throws an error and quits. I don't know if this is intended or just a bug.

Output:
...
[Downloading track] Maulisé - Une Beat Encore
TypeError: Cannot read property 'snippet' of undefined
at searchVideo.then.results (/usr/lib/node_modules/spotivy/youtube_search.js:60:65)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
[Download failed] Video not found

@danguilherme
Copy link
Owner

It's probably a bug.

Could you post the full output with the --verbose flag on?

@MuadDib81
Copy link
Author

MuadDib81 commented Aug 11, 2018

[spotivy v0.4.3]
                  [DEBUG] Loaded options:
 {
  "spotifyClientId": "XXX",
  "spotifyClientSecret": "XXX",
  "youtubeKey": "XXX",
  "output": "/home/muaddib/test/media",
  "format": "video",
  "quality": "highest",
  "flat": false,
  "audio": false,
  "username": "Bostjan Bele",
  "playlists": [
    "37i9dQZF1DWTvNyxOwkztu"
  ]
}
Saving media to '/home/muaddib/test/media'

                  [DEBUG] Spotify login
   [Downloading playlist] Chillout Lounge
                  [DEBUG] Fetching playlist tracks (37i9dQZF1DWTvNyxOwkztu)
                  [DEBUG] Fetch paginated: "getPlaylistTracks"
                  [DEBUG] Fetch paginated: loading 0..20
                  [DEBUG] Fetch paginated: loaded  20/80
                  [DEBUG] Fetch paginated: pushing down the stream
                  [DEBUG] Fetch paginated: next page
                  [DEBUG] Fetch paginated: loading 20..40
                  [DEBUG] Fetch paginated: loaded  40/80
                  [DEBUG] Fetch paginated: pushing down the stream
      [Downloading track] Maulisé - Une Beat Encore
                  [DEBUG] Search video: search "Maulisé - Une Beat Encore"
                  [DEBUG] Fetch paginated: next page
                  [DEBUG] Search video: 0 item(s) returned
                  [DEBUG] Search music video: None of the videos is considered a good result
TypeError: Cannot read property 'snippet' of undefined
    at searchVideo.then.results (/usr/lib/node_modules/spotivy/youtube_search.js:60:65)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
        [Download failed] Video not found
                  [DEBUG] Error: Video not found
    at Stream.highland [as _generator] (/usr/lib/node_modules/spotivy/index.js:295:14)
    at Stream._runGenerator (/usr/lib/node_modules/spotivy/node_modules/highland/lib/index.js:1343:10)
    at Stream._resume (/usr/lib/node_modules/spotivy/node_modules/highland/lib/index.js:1178:22)
    at Stream._checkBackPressure (/usr/lib/node_modules/spotivy/node_modules/highland/lib/index.js:1091:10)
    at Stream._resume (/usr/lib/node_modules/spotivy/node_modules/highland/lib/index.js:1172:33)
    at Stream.resume (/usr/lib/node_modules/spotivy/node_modules/highland/lib/index.js:1205:10)
    at Stream.pull (/usr/lib/node_modules/spotivy/node_modules/highland/lib/index.js:1596:7)
    at Stream._generator (/usr/lib/node_modules/spotivy/node_modules/highland/lib/index.js:3503:14)
    at Stream._runGenerator (/usr/lib/node_modules/spotivy/node_modules/highland/lib/index.js:1343:10)
    at Stream._resume (/usr/lib/node_modules/spotivy/node_modules/highland/lib/index.js:1178:22)
    at Stream._generator_next (/usr/lib/node_modules/spotivy/node_modules/highland/lib/index.js:786:22)
    at /usr/lib/node_modules/spotivy/node_modules/highland/lib/index.js:3524:21
    at /usr/lib/node_modules/spotivy/node_modules/highland/lib/index.js:1593:9
    at Stream.s._send (/usr/lib/node_modules/spotivy/node_modules/highland/lib/index.js:1549:9)
    at Stream.write (/usr/lib/node_modules/spotivy/node_modules/highland/lib/index.js:1650:18)
    at Stream._send (/usr/lib/node_modules/spotivy/node_modules/highland/lib/index.js:974:26)

@danguilherme danguilherme added the hacktoberfest Issues that are easy to resolve label Oct 5, 2018
@danguilherme danguilherme changed the title If not found in youtube, quit App crashes if video was not found on YouTube Oct 5, 2018
@lnfnunes
Copy link
Contributor

lnfnunes commented Oct 9, 2018

@MuadDib81 What command did you run to get this error?
I tried spotivy playlist spotify 37i9dQZF1DWTvNyxOwkztu and everything works fine!

@MuadDib81
Copy link
Author

MuadDib81 commented Oct 9, 2018

the command I used was spotivy playlist "Bostjan Bele" 37i9dQZF1DWTvNyxOwkztu -a

@danguilherme
Copy link
Owner

Issue fix landed in v0.4.4.

Thanks @MuadDib81 for reporting and @lnfnunes for fixing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug hacktoberfest Issues that are easy to resolve
Projects
None yet
Development

No branches or pull requests

3 participants