Can i play track in play.spotify.com? -


my problem is, want search single songs ( or many single songs in array) , echonest return me spotify id in foreign_id. can use spotify_id continue searching desired song in spotify library.

in example returns tracks : http://developer.echonest.com/api/v4/song/search?api_key=qr3h8mybuzdytdwub&format=json&results=1&artist=the%20carpenters&title=top%20of%20the%20world&bucket=id:spotify&bucket=tracks

{"foreign_release_id": "spotify:album:0rzyzdffrtxvrehqoreiua" , "catalog": "spotify",  "foreign_id": "spotify:track:4vdtkwly7revq8voncg43z",  "id": "truberv144d15243bc"},  {"foreign_release_id": "spotify:album:3jmq6qzzasytorwvbsrou9",  "catalog": "spotify",  "foreign_id": "spotify:track:3ng65zhlpdhqrepmbqihbs",  "id": "trrimle144d120b851"},  {"foreign_release_id": "spotify:album:5pzgou1ybtxdc7n8dc0oed",  "catalog": "spotify",  "foreign_id": "spotify:track:48xjc1yyvayikrhqxdyerf",  "id": "trbfcha147b6e38122"},  {"foreign_release_id": "spotify:album:0aictfxeiiyotuz9s2pnnd",  "catalog": "spotify",  "foreign_id": "spotify:track:4lejyhkieqi5lfyfrn5bel",  "id": "trtegdo147b6e4e95a"} 

when attach spotify id echonest's return play.spotify.com becomes "play.spotify.com/track/4lejyhkieqi5lfyfrn5bel" doesn't work, don't know why. when attached album or artist, works "play.spotify.com/album/3jmq6qzzasytorwvbsrou9".

i want ask 1 more question: can stream 1 track (one song) directly spotify web application after use command: "api.spotify.com/v1/tracks/{id}" url of track(the song)?

the track plays me when go to: https://play.spotify.com/track/4lejyhkieqi5lfyfrn5bel

the specific track not available in market longer, can see if check https://api.spotify.com/v1/tracks/4lejyhkieqi5lfyfrn5bel

$ curl -s https://api.spotify.com/v1/tracks/4lejyhkieqi5lfyfrn5bel | jq .available_markets [] 

however, there many other tracks has same recording , spotify should play 1 of tracks instead. see 1 client should play instead add market query parameter, in case se sweden. https://api.spotify.com/v1/tracks/4lejyhkieqi5lfyfrn5bel?market=se , check uri attribute.

$ curl -s https://api.spotify.com/v1/tracks/4lejyhkieqi5lfyfrn5bel?market=se | jq -r .uri spotify:track:4hbj7gnbasas6dumsimd6q 

i can't imagine in market there no replacement track. think bug spotify web player.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -