Are you familiar with lastfmsubmitd? Here:
It takes the pain out of writing lastfm plugins, because all you need to do is have the server output details of each song served to /var/spool/lastfm/
Just wondered if this might help, if you weren’t already aware of it. Not much use for windoze users of course, but great for *nix.