I briefly spoke to Poiru about a method of getting Album artwork for Spotify without being able to get it directly from the application itself.
I was tinkering with some Snarl (Growl for Windows) integration into Spotify, I realized that the Last.FM API provides a number of details about a song and requires only the artist and track title to get additional information about the song.
Of course, you would need an API key, but they are freely available.
The information you could easily get from this includes album artwork, song duration, genres, as well as how many people have listened to it on Last.FM and how many total listens it has on Last.FM.
While my specialties lie mostly with C# and not C++, it's extremely easy to parse what data you want (I'm aware that C++ would take more work, but I'm not sure how much).
For example, here's a C# snippet that will get the URL of album artwork:
Code: Select all
string path = "http://ws.audioscrobbler.com/2.0/?method=track.getinfo&api_key=[api key]&artist=[artist]&track=[track]";
XPathDocument doc = new XPathDocument(path);
XPathNavigator navigator = doc.CreateNavigator();
XPathNodeIterator nodeIterator = navigator.Select("/lfm/track/album/image");
XPathNavigator node = nodeIterator.Current;
string imgUrl = node.InnerXml;
I'm just trying to think of ways to help you guys improve your already awesome software! Thanks for all the hard work.