October 13, 2008

Introducing the Spotify DJ v. 0.01 0.0.20.0.3

[UPDATE: Morten tells me the config is the same on a mac, so I rewrote the script so it should also run on a Mac with perl installed]

[UPDATE II: The player is here! I can now remote DJ with Spotify!]

Inspired by Morten's suggestion for a DJing feature in Spotify and by the source code for Scrobblify, the Last.fm hack for Spotify, I decided to have a go at making just the feature Morten requested as a hack.
I started looking at the config-files for Spotify, found a file that is continuously updated with the track currently playing. It took a little figuring out to convert the internal hexadecimal ID to the Base62 encoded IDs used in the URLs but I figured it out and here it is - the very first rudimentary Spotify Auto-DJ for Windows.
I am running a version of this perl script which subscribes to file change notifications for the config file with the "now playing" track ID and then submits the latest track to this web server.
You can always find the current track I'm playing here or listen right away here. The web player automatically loads new tracks when I start listening to them.

Posted by Claus at October 13, 2008 10:25 PM
Comments

Cool idea, but surely a hack, and since I don't have Spotify, I wouldn't know why it's cool.

ps. All Macs have perl installed ;-)

pps. I hate Captcha

Posted by: Kim Bach at October 13, 2008 11:54 PM

A hack is the only right way to start off as anything.

I hate captchas too, but I hate spam more.

Posted by: Classy at October 13, 2008 11:55 PM

I hate spam as well, but I've outsourced it to Akismet ;-) - btw, building this using Last.fm is a breeze, unfortunately it will only playback previews ASFAIK

Posted by: Kim Bach at October 14, 2008 8:00 AM

Akismet: Tried it - didn't filter properly in my case.
Last.fm: Exactly - and where's the fun in that.

Posted by: Classy at October 14, 2008 8:59 AM
Post a comment