Better behaved submission to last.fm

Forums:

I wrote a script that uses OnSongChange to trigger submissions to last.fm (using lastfmsubmitd), but one that waits until the song is half played before submitting. This way skipping through tracks after a few seconds will not cause submissions to last.fm.

Script is here:

http://files.lukeplant.fastmail.fm/public/moc_submit_lastfm

Blog entry:

http://lukeplant.me.uk/blog.php?id=1107301687

It can go into contrib if wanted. IMO, it is nicer than current script in contrib that does this, since it waits for an appropriate length of time rather than submitting as soon as a change is noticed (and also: it doesn't require a background process to be run first, and doesn't depend on the 'lastfm' python module, which doesn't seem to be the same on my system).

Luke

I use this script all the time and it works great. I only had to add --encoding UTF-8 in order to get encoding right.

This is a great script! I agree with tomaszg, though, that UTF-8 encoding should be declared.

Although I have lastfmsubmitd configured correctly (at least, it certainly works when I run it manually), I cannot for the life of me get OnSongChange to do anything! I just revived an old post here about it.

If anyone can help, I'd be much obliged. Getting solid scrobbling performance out of MOC would be a dream come true, and this script was the missing link.

I got it working, sorry for the trouble! See post I linked to in case you're looking for how I resolved it.

This is a very fine script, thank you again for sharing. I particularly like that it keeps checking, so it stays current regardless of ultimate playback time (which is different than the static value, e.g. if a user fast forwards or skips).

Thank you!