When last.fm announced on 2012-12-13 that they were pulling out of Switzerland in mid-January, I requested a refund (Update: sorry, the link is dead) (unsuccessfully so far) and started looking around for an alternative immediately. Spotify seems to fit the bill nicely, and barring any glaring privacy or stability issues it's probably worth a threefold price increase.
But how to migrate? last.fm has got XSPF and tab-separated values export functionality at /user/<username>/library/loved; great! Except that didn't work the first half a dozen times I tried, and Ivy, the most promising import service, only supports some iTunes format and comma-separated values, so I ended up making a tool to convert lfmCOL.pl XML to CSV. Of course, after finishing that I tried last.fm again, and now the XSPF export worked, so I created another project to convert XSPF to CSV. Nice hacking exercise to ensure that it produces parseable CSV even with quotes and high-Unicode characters in the input.
Ivy kept telling me I didn't select a track column in the second step, but
would gladly accept the pasted result from
xclip -in favorites.csv without even asking about columns. Out of
1222 last.fm tracks it found 734 (60%) on Spotify, which is not too terrible
considering the impressive collection of obscure tracks on the former.
No webmentions were found.