Download: MediaFire (400Kb)
The ability to filter a list of tracks by artist and album has been in iTunes and Foobar2000 for quite some time. So long that I find myself missing it while using Spotify. A few weeks ago, I added this ability for search results in SpotCon but with this update it becomes much more powerful with the introduction of playlist support. Now, for example, you can import your playlists from Spotify and easily listen to a single artist or album from that playlist.
If you don’t care about the technical details regarding the addition of Playlist support, you can stop reading now.
Given a Spotify playlist URI, it turned out to be non-trivial to a) retrieve the playlist’s complete list of tracks, and b) return that information to SpotCon.
The Metadata API naturally does not include a method to do this and the embed.spotify.com playlist pages truncate to 200 tracks and open.spotify.com truncate to 30! e.g. 107.7 The End (with roughly 800 tracks).
The solution I came up with feels a little hacky, but so does the rest of SpotCon, so I’m cool with it!
- Bootstrap IIS Express in the SpotCon ClickOnce installer. See Vaidy’s IIS Blog for information regarding how to do this. Unfortunately, the blog post is very old and I had to rebuild the manifest using Bootstrapper Manifest Generator. You can see the generated manifest here .
- Built a lightweight web service with which both Spotify and SpotCon can communicate.
- Start IIS Express and the web service when SpotCon launches. Also stop it when SpotCon closes.
- Built a simple Spotify app on which playlists can be dragged and dropped. Then using the Spotify Apps API, retrieve the entire list of playlist tracks, and POST that information to the web service.
- From SpotCon, make a request to the web service to retrieve the playlist information.
- Cache everything.