Obviously it’s not as good as having mt-daapd output the details of each song into /var/spool/lastfm play by play, but it’s a reasonable stopgap. I don’t tend to listen to any song more than once in a day, so it works for me.
Thanks for the script. However, does it really work for you every time? It does not for me, as from time to time lastfmsubmitdaemon ignores the written files and does not submit the information. What is submitted and what not is fairly random.
I first suspected empty files, but that’s not the reason. No clue…