Chartbeat Spotify Application. Very beta :)
You need a Spotify developer account to use the application.
mkdir ~/Spotify cd ~/Spotify git clone email@example.com:chartbeat/spotifyapp.git apps-chartbeat (restart Spotify) enter 'spotify:app:chartbeat' in the Search box
Not a lot of time was spent on this, so there are plenty of issues :)
it seems like you can't "favorite" a developer app, at least not on OS X, so you have to search for the app on each app start. Pretty tedious.
the app plays the song over and over as long as you are over the threshold. Obviously not optimal.
it is fairly unclear what the lifetime of a Spotify app actually is, since the docs are clearly wrong. Currently on OS X, the app works fine "in the background".