Skip to content
This repository was archived by the owner on Feb 17, 2022. It is now read-only.

Crash: numTracks of null #7

Open
jakeleboeuf opened this issue Jan 20, 2015 · 2 comments
Open

Crash: numTracks of null #7

jakeleboeuf opened this issue Jan 20, 2015 · 2 comments

Comments

@jakeleboeuf
Copy link

Passed in a Spotify playlist uri and it crashed the app:
play spotify:user:natecook7:playlist:7p0wjqToNjHfu4bzLvY3Vk

Returns:

/home/pi/Apps/crispyfi/lib/spotify_handler.coffee:141
.track.index = ++this.state.track.index % this.state.playlist.object.numTracks
                                                                    ^
TypeError: Cannot read property 'numTracks' of null
  at SpotifyHandler.get_next_track (/home/pi/Apps/crispyfi/lib/spotify_handler.coffee:164:73)
  at SpotifyHandler.skip (/home/pi/Apps/crispyfi/lib/spotify_handler.coffee:102:12)
  at IncomingMessage.<anonymous> (/home/pi/Apps/crispyfi/lib/slack_interface/request_handler.coffee:21:41)
  at IncomingMessage.g (events.js:180:16)
  at IncomingMessage.emit (events.js:117:20)
  at _stream_readable.js:944:16
  at process._tickCallback (node.js:442:13)
@jakeleboeuf jakeleboeuf changed the title Crash: numTracks is null Crash: numTracks of null Jan 20, 2015
@dkoch
Copy link
Contributor

dkoch commented Jan 21, 2015

Thanks for the notification, I'll have a look tomorrow.

@dkoch
Copy link
Contributor

dkoch commented Jan 26, 2015

play is not supposed to take playlists as arguments but rather links to single files, e.g. spotify:track:6d5VZ3G9PED8DkIiwXcOBn. Playlists are handled using the list command.

Still, this shouldn't outright kill the app, so I'll fix this in a bit.

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

No branches or pull requests

2 participants