Audioscrobbler support in Sonata

As I’ve mentioned before, Sonata is my favorite music player. One shortcoming, however, is that it lacks support for last.fm’s audioscrobbler, which allows music players to automatically submit songs to the service and help build one’s musical profile.

No more: sonata-audioscrobbler.diff

I whipped this up in a couple hours, so be on the lookout for bugs. It’s not so good at reporting bad passwords, so you have to look at the console output for that information. Either you see “BADAUTH” (bad) or “Uploaded 1 tracks successfully” (good). If the Sonata author adds feedback for mpd authentication problems, I’ll hook up to that.

I’ll also update my sonata olpc package to include this patch.

Update: Added a check to ignore songs that don’t have all the metadata that audioscrobbler wants.

2 thoughts on “Audioscrobbler support in Sonata”

  1. Hi,

    thank you, it works well! One minor complain : it posts the played songs to audioscrobbler right at the beginning of the playing, while the "rule" is to post them when they are played up to their half or up to 4 minutes (whichever happens first).

  2. Ah, I didn't know about that. I also added the restriction of not including tracks shorter than 30 seconds, and not submitting tracks where the seek controls are used.

    The only remaining wrinkle is that a song might be submitted multiple times if sonata starts up and the song is already playing on mpd.

Comments are closed.