-
Notifications
You must be signed in to change notification settings - Fork 17
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
how I can load a playlist spotify on a player and play song ? #5
Comments
Glad to help, What is playlist_uri and how do you get it? Can you post console.dir(reply) of this loadToPlaylist? |
I've just tested adding playlist and it seems to work. I admit that I haven't implemented playlist querying in the library but when I copied playlist URL from spotify desktop app (right click on playlist and 'copy spotify URI') and passed it as string argument to loadToPlaylist it works just fine, is your playlist url something like this? spotify:user:youruserid:playlist:66VOb4xsC9yEk7X5DXVXsW |
helle thanks for reply, ok so the code I have put is ok ? I use this type of uri : https://api.spotify.com/v1/users/spotify/playlists/3jtuOxsrTRAWvPPLvlW1VR/tracks |
Hi, The code looks ok, (unless player with this name doesn't exist) but the URI you provided probably won't work. Do you have access to standalone, desktop Spotify client (works on Windows/Linux and MAC too I guess)? You're trying to open http URL (probably from web client) and this is not going to work (I haven't tried that but you did and it didn't work). Valid Spotify URI for a playlist should be sth like this: eg. spotify:user:user_id:playlist:66VOb4xsC9yEk7X5DXVXsW Try to copy URI from Desktop player instead of URL from web player, and you should be ok. If you don't have access to desktop player, you can try to change my example. Type your user id as user_id above and exchange the playlist hash in my example to yours (3jtuOxsrTRAWvPPLvlW1VR). If Spotify URI templates are consistent (which I assume is true) it should work. BTW1, I'm working on extending Spotify to support playlist querying, etc. Stay tuned I plan to release new version soon. BTW2, Try to log the reply also if request failed (reply.ok is false) to see if you even get to this loadToPlaylist function. Let me know if it started to work for you. If not we'll burn the issue down to the ground. |
hi, any update? |
hello,
I try to load a play list in a player (with his player id) and start playing list song of the playlist but I dont see how do that :-)
can you help me
now I test this code but ...
exports.play_playlist = function (playlist_uri) {
console.log(playlist_uri)
}
can you help me please ?
The text was updated successfully, but these errors were encountered: