My Leeds Hack 2 Project

Thought I would write a blog post about what I built in 24 hours for Leeds Hack 2 last weekend. I kinda got distracted last week and not had the time to write this post.

You can look at all the projects that people finished over on the Leeds Hack Website.

So what did I write

I decided to write something that I had been pondering about for a while. It’s called Spotify Roulette and revolves around the idea of crowd sourcing a new artist or area of music to listen to.

Originally it started off with me posting on Twitter quite a while back asking for something new to listen to, to which @Stanton responded with Hybrid. (I can’t find the original tweet on twitter but it’s here on Spotwitfy) Which are actually quite nice to listen to and I have a nice Spotify playlist to listen to.

I was wondering if there was a way to automate this.

So thru the combination of the Twitter and Spotify Meta Data API’s, means I can post out to Twitter, await a response, parse out the Artist and then pop open Spotify with a random track by that Artist and if the requester wants a playlist can be generated, and thru a limitation in Spotify, drag and dropped into Spotify to listen further to the Artist.

In short

In short its pretty straight forward.
Just a handful of calls to a couple of different API end points to get an Artist ID from the name, then their albums and the tracks on these albums. Chuck in a little GeoIP to hopefully check the tracks are available in the requesters’ region.
Grab the first track, pop open Spotify and grab another 10 tracks to make a playlist.

Finally I used Nerf Guns to help demo! Russian Roulette stylee.

Responses

People on Twitter can either response with text, an artist which we parse out the @user and the hashtag word. Then look that up on Spotify.
Or a response can be either an HTTP open Spotify link or a Spotify protocol link. Either to the artist page, track or album.
if it’s the Artist, I can parse out the artist ID and look for albums and tracks.
Currently not playlist urls, but that’s easy to implement.

Technology

So we used,

  • Twitter API, using @Abraham Twitter oAuth Library
  • Spotify Meta Data API
  • MaxMind GeoIP
  • jQuery and jQuery UI
  • Rick Astley
  • Nerf Guns

Give it a Go

Give it a go and offer me some feedback.
Watch out for Rick Astley tho. He likes to crop up every now and again….

It’s still a little rough round the edges in terms of theme/layout.

Spotify Roulette (http://spotifyroulette.com/)

Future

Hopefully if people like it and use it I can expand further.

Perhaps use Facebook to share playlists, or another way to crowd source a new artist. And if Spotify release a HTTP API for generating and saving playlists then incorporate that too.

Long Time Since I blogged

A General Update….

Again, its been a while. Things have been pretty busy.

Currently I just fixed the LSRfm.com Podcasts, they were downloading a minute or two of audio the PHP was dying, FAST CGI php5 was being ghey.

So after a quick chat with Dreamhost over live chat, my script now rather than munch the file, just passes it off to a http location, less of a memory muncher too.

SRAchart is its usual self, tho we did get a full house of Charts last week, (well near enough), Ellie Goulding and Owl City are dominating, and Glee Started Charting too.

(Yes I am a Glee Fan)

Handed in the Motion Graphics Brief.

So Uni Wise I just need to sit down and code code code, both for Project 2 (ala 360gaming.net enhancements), and start planning and researching what I need for project 2.

And start writing an essay for Futures and Strategies, fun times.

I’ve not had any spare time to play Halo, tho the Reach Beta has been announced! Hurrah!

Now I must get back to coding stuff for LSRfm.com fixed the Jukebox, now to do the music db, tho I do have a nice IRC bot sat in the new LSRfm.com Chatbox

Also <3 jQuery....