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

Comments

Projects
None yet
3 participants
@MuadDib81

MuadDib81 commented Aug 11, 2018

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

This comment has been minimized.

Owner

danguilherme commented Aug 11, 2018

It's probably a bug.

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

@MuadDib81

This comment has been minimized.

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 bug label Aug 15, 2018

@danguilherme danguilherme changed the title from If not found in youtube, quit to App crashes if video was not found on YouTube Oct 5, 2018

@lnfnunes

This comment has been minimized.

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

This comment has been minimized.

MuadDib81 commented Oct 9, 2018

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

@danguilherme

This comment has been minimized.

Owner

danguilherme commented Oct 17, 2018

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