Radio Scrobbling via MQTT
Since I often listen to the most excellent Soma FM during the day (go support them, it's worth it!) I often wish that I could go and stash some similar tunes to listen to when I'm not online. To do this, I sell my soul to CBS and use last.fm to generate similar / listened to by others recommendations.
Sadly Rhythmnbox doesn't scrobble radio stations (even though the scrobble API has a flag for this
track.scrobble(chosenByUser=0) to indicate that its been chosen by a radio service), despite it updating my 'now listening' status on IM. So, in a geeky overkill solution I decided to save time in the long run and use a pub/sub system with MQTT. Oh, and use some python and twitter along the way...
The design is that I have an MQTT publisher that uses the tritter streaming api (via tweepy) and filters for all the somafm twitter streams that Rusty pushes with BigUrl. This gives me near realtime announcements of the start of the track being played (after some trivial split / strip manipulation)
ie
justcovers Pat Boone - Enter Sandman (2012-06-25 07:20:30)
digitalis Zephyrs - Stand Round Hold Hands (Ulrich (2012-06-25 07:20:37)
secretagentsoma Eat Static - Love Truncheon (2012-06-25 07:21:02)
beatblender Kerry Chandler (Lazy Dog Ben W - Isis (2012-06-25 07:21:29)
sonicuniverse In The Country - Only The Birds Can See Us (2012-06-25 07:21:29)
Syndicated 2012-06-25 07:29:00 (Updated 2012-06-25 07:29:19) from Elwell