scroball.rb: an audioscrobbler client

After discovering the awesomeness that is last.fm I became annoyed at it indexing the misrepresentative contents of my local iTunes library. This gave the false impression that I spend most of my time listening to Kanye West’s Gold Digger (catchy though it is).

I play most of my music using iTunes Shared Libraries and an mt-daapd server running on a Debian NSLU2. If there’s a way to make last.fm scrobble music iTunes accesses from a DAAP server, I couldn’t find it. Then there’s all the music I listen to with players that lack audioscrobbler plugins. Why wait for last.fm to work out what my tastes are? I needed a way to let audioscrobbler catch up with me: manual scrobbling.

Fortunately audioscrobbler provides documentation of the Audioscrobbler Realtime Submission Protocol. From this, I hacked together a ruby script to scrobble my music directories: scroball.rb. It does do a little bit of subterfuge: it backdates and calculates the start times to avoid collisions that audioscrobbler would pick up in sanity checking. This can legitimately be used to retroactively scrobble a listening session.

ruby ~/scroball.rb p00ya `/bin/date -d 'last wednesday' +%s` .

yay! Hopefully the last.fm folks like it; it’s not intended for abuse.

Leave a Reply

Your email address will not be published. Required fields are marked *