Closed we4sz closed 5 years ago
Hm, when I try to play that track I get the correct exception since the track is not available in Spotify. It does show up in the Spotify client, though:
var track = spotify.createFromLink('spotify:track:2CYhKfcgrxziIkBLs8cPd0');
spotify.player.play(track);
Error: Track not playable
at repl:1:16
at REPLServer.self.eval (repl.js:110:21)
at repl.js:249:20
...
I also tried to put it in a playlist and play it, same result.
So what do you mean by crashing? A segmantation fault or any of that kind? Because the exception is expected, you need to wrap your player.play
calls in try/catch
blocks. I guess I should mark methods that throw such exceptions in the documentation.
confirm if track is available in region associated with your account. if you have US region, and you try to play track only available for GB region, it will not play, though, will show up on spotify.
— Fahad Khalil *// GrayMath Technology Co.*
mobile: +61 406 183315 email: fahad@graymath.com | skype: fahad.khalil web: www.graymath.com
On Sat, Jun 14, 2014 at 6:08 PM, Moritz Schulze notifications@github.com wrote:
Hm, when I try to play that track I get the correct exception since the track is not available in Spotify. It does show up in the Spotify client, though:
[image: screen shot 2014-06-14 at 10 07 15] https://cloud.githubusercontent.com/assets/3382041/3277934/f7da01f4-f39a-11e3-8a11-b39cdf3b117f.png
var track = spotify.createFromLink('spotify:track:2CYhKfcgrxziIkBLs8cPd0'); spotify.player.play(track); Error: Track not playable at repl:1:16 at REPLServer.self.eval (repl.js:110:21) at repl.js:249:20 ...
I also tried to put it in a playlist and play it, same result.
So what do you mean by crashing? A segmantation fault or any of that kind? Because the exception is expected, you need to wrap your player.play calls in try/catch blocks. I guess I should mark methods that throw such exceptions in the documentation.
— Reply to this email directly or view it on GitHub https://github.com/FrontierPsychiatrist/node-spotify/issues/59#issuecomment-46081588 .
I've tried to play, spotify:track:2CYhKfcgrxziIkBLs8cPd0 which i have in one of my playlsits. The track does not appear in "real spotify" but shows here. Need to check for permissions and stuff.