Last.fm scrobbling on UPnP shares

Last.fm logo

I've had an account on Last.fm for more than 3 years and liked it on the spot. I love to explore new music, discover new artists, listen to streaming radio (that is, until it was free) and especially scrobbling the music I listen!

The geek in me simply freaks out seeing the amount of stats you can get from your Last.fm "scrobbled" data: the music I listened the most this week? Last month? What is my favorite Porcupine Tree song? In fact there's also lot of external services that offer awesome visualizations of your data.

This was great up to the day when I decided to put my whole music collection on the Windows Home Server and listen to it via the built in UPnP media sharing in Windows Media Player. That day I discovered that the Windows Media Player plug-in doesn't scrobble songs on network shares! It doesn't work, neither from an SMB shared folder, nor directly through UPnP sharing (which in fact is HTTP streaming).

Thus, I have been unable to scrobble anything for weeks (except the occasional song from my laptop). Very sad...  :(

Yesterday I remembered that the whole Last.fm client is actually open source, so I thought that maybe I could give it a look and try to fix it. And since there's plenty of people on the Last.fm forums with my same problem, my work could be pretty useful for somebody other than me, for a change.  :D

So with Visual Express C++ and the code from the SVN repository I hacked together an extremely simple "fix". The hardest part was getting the code to compile, since it relies on the ATL libraries which are nowhere to be found on the Microsoft site! (...actually, they can be found in some old Platform SDK, after some hour of googling and cursing)

So, here's patch file for Scrobbler.cpp. If you too are a soul in pain because nobody scrobbles your network shares, download the patched scrobbler plug-in and simply put it in

C:\Program Files\Windows Media Player\Plugins

or, on 64 bit systems

C:\Program Files (x86)\Windows Media Player\Plugins

and replace the original wmp_scrobbler.dll plug-in.

Hope that helps! Now back to scrobbling...