RSS
 

Archive for December, 2009

Attn Hackers: Opening up Grooveshark

21 Dec

At Grooveshark, we get a lot of requests for features that aren’t possible to create in Adobe Flash/Flex/Air or that we just plain don’t have time to do.

In that vein, we’re working on opening up Grooveshark to make it a bit more extensible.

The first thing we’re doing is making the player status really easy to get to. People want their chat clients to be able to reflect what’s playing in the status when they are listening to the desktop app. We can’t do that through AIR directly, and we’re not going to have time to learn about and write special code for each chat client out there, but now anyone who already knows about that stuff or just really wants to put the time into it can do it.
There is a file that we are storing in documentsDirectory\Grooveshark\currentSong.txt
documentsDirectory is defined by Adobe to be the current users’ documents directory. In windows that’s %HOMEPATH%\Documents\Grooveshark\currentSong.txt

The format of the file is pretty obvious if you open it up, but I’ll spell it out here:
SongName\tAlbumName\tArtistName\tStatus
where \t is a hard tab (note: names are guaranteed not to have tabs in them)
Valid statuses are “playing,” “paused” and “stopped” – we may add others later if it makes sense to do so. Note that if a user clears their queue or quits Grooveshark, the last song to play will still be listed with a status of “stopped”.

Other ways we plan to open up Grooveshark to 3rd party developers includes creating an external interface through javascript for the web client so people can make Firefox or Chromium extensions to control playback, and creating something similar that can allow the desktop app to accept connections from 3rd party apps running on the desktop alongside, so for example someone could write a plugin that registers global keybaord shortcuts for play/pause, back and next. Again, AIR will not allow us to register those shortcuts directly.

 
 

The Case of the Crazy Driver

09 Dec

I often work nights at Grooveshark, which means I also drive home very late or very early, depending on your perspective.

A few times on my way home, I’ve noticed somebody driving in a fashion that can only be summed up as ‘crazy.’ From a distance it looks like they start to pull up into somebody’s driveway, then turn onto the sidewalk, then back onto the road, and then back up onto the sidewalk again, until I or some other car gets near, then they zoom off down some side street.

Tonight I saw that again and I was on my scooter, so I decided to follow the car down the side street. It didn’t take them long to realize they were being followed, so they started driving even more crazily, speeding and running stop signs, turning off on even more side streets, but still sometimes pulling up onto the sidewalk and then veering off. I started to get freaked out at how freaked out this person was, and how crazy they were driving, afraid that they would decide to try to run me over or something, so I gave up. I turned around and took off, but not before looking back. And at that moment the car I had been following was pulled onto the sidewalk again, and I finally saw the detail I had been missing before. What I saw was a newspaper flying out the window of the car. My crazy driver was just a person delivering papers.

 
No Comments

Posted in life