Heyo,
If you use Last.fm/Libre.fm you might be interested in running your own local scrobbling server in Haskell.
$ cabal update
$ cabal install scrobble
$ scrobble-server 8910
Source is here with further instructions for audio players and such:
https://github.com/chrisdone/scrobble
Exactly what the server does with the scrobbles it receives is purely up to you, use it as a library and do as you please. Personally I might work on a Last.fm replacement, at least as far as the statistics/reporting generation goes.
Ciao!