Here at Unspace, we like music. I mean, who doesn’t, but we like to have music playing all day long while we work. We’re the sort of people who actively seek out new bands and love sharing our finds with each other. Our office setup isn’t anything special; my laptop is connected to a speaker system, I have iTunes open, I add things to a playlist, and that playlist plays all day long.
Ideally, we’d like anyone in the office to be able to add music to the playlist; previously they would just yell at me and I would add their request to the playlist. iTunes Remote for the iPhone works well, but I don’t really want to take out my phone to change the song — I’d rather do it on the screen where I’m working. A quick googling reveals a few solutions for Apache+PHP, one for Windows XP, a million ugly scripts, and even an entire Java servlet. Talk about bloat!
So I decided to roll my own. I’d been eager to try out Sinatra for a long time, and this seemed to fit the bill nicely: it’s a small web app that does one simple thing and does it fast. As for the design and layout, we decided to yoink it from iTunes rather than reinventing the wheel.
Interested? You can clone it here. All you need is ruby, rubygems, and the sinatra, rb-appscript, and active_support gems.
Stuff I’d like to add on later:
- Search
- Adding tracks from remote libraries
- Realtime updating
- Track seek
It’s an open github project, so feel free to fork and contribute! Read the README for instructions on running the server.
