Friday, 13 October 2017

Connecting track names and artist names with Spotify Uris

itemprop="text">

I've found related questions (like
href="https://stackoverflow.com/questions/8408581/accessing-spotify-metadata-api-from-within-a-spotify-app">this
one), but nothing that directly answers my question: I need a direct way to
turn artist name and track name into a spotify link. Just like spotify does for the
local file list (some are links, some are not, I assume because spotify doesn't have
those tracks.



How can I turn something like
artist:'Francolin' and track name:'Hospital Song' into a Spotify uri without searching
for it (which will return multiple results, and I don't know which one to use). How does
the Spotify local files list do it?


class="post-text" itemprop="text">
class="normal">Answer



I ran into
the same problem as you but I don't think there's a direct way to convert it. Instead I
just run for a search with "artist:'$artist' title:'$title'", which should be very
accurate, and just use the first result in the array of
results.



No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...