SpotCon: Playlist filtering by artist/album

Download: MediaFire (400Kb)

Source: GitHub

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!

  1. 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 .
  2. Built a lightweight web service with which both Spotify and SpotCon can communicate.
  3. Start IIS Express and the web service when SpotCon launches. Also stop it when SpotCon closes.
  4. 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.
  5. From SpotCon, make a request to the web service to retrieve the playlist information.
  6. Cache everything.
About these ads
SpotCon: Playlist filtering by artist/album

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s