Last.fm dump & Libre.fm import

Post Published:


I looked at the issue of the Python methodology of getting my Last.fm profile data to my Libre.fm profile today. I can happily say I have completed this task already.

I followed the instructions on the Wiki about it. It wasn’t as straightforward as that, since I use Windows Vista. Most of the instructions are geared towards Linux users. I got the correct Python install for Windows. That was easy enough. Then when that was installed I had to use cmd to set the path to Python, to make it easier to use. That much I got easily.

Then came the understanding of how to run a Python script, which I eventually did get going, the lastscrape.py which is the first part of the job, the getting of the information from last.fm. That was a bit heady, all that info streaming in the small black cmd window. I was mostly frazzling myself over what was to come, the worst part, the “deleting duplicate entries” deal. I haven’t done this sort of work before, and doing it from instructions not really meant for Windows users was frustrating, and searching the web for help, as directed from the libre.fm wiki, had me still not knowing what to do. I finally gave up on that angle and searched for a Python script to do the job. I found something, and I fiddled around with getting it to run, and finally did. It re-ordered the results, but that didn’t seem to matter, as everything uploaded fine, but I can’t tell on my profile if the dates go back to 2005 or not.

My biggest struggle after the duplicates thing was to get import.py to work. I ended up having to type the full path to the script and to the file, I guess whatever I did in the beginning I made work to make it easier then, but that was pre-29,313 tracks dumping from last.fm, I hadn’t written it all down, as I SHOULD have, thus I can’t be sure as to what I did that was different beforehand.

I did get the import.py to work though, it went fine for 7,386 tracks, then errored. I found a blank line in the file right there. The only thing I had on hand to open the file and jump to a specific line was Firefox (view source) where the “jump to line …” command is available. It worked out fine. I copied the remainder and put it into a new text file, and gave it a new name, then started the Python import script again. It works for 16,198 tracks, then hiccupped again, but this time I couldn’t find anything in the file where it stopped, that seemed to indicate anything … so whatever. I just did what I did before, copied the remainder of the file that wasn’t uploaded yet into a new file with a new name and re-started the Python import script. That part was 5,729 tracks.

The total tracks that uploaded to Libre.fm were 29,313. The dump included a couple of days of multiscrobbling, so I deleted those from the top of the dump before deleting dupes and importing it to Libre.fm.

Overall:

  • Last.fm reports that I have 29,817 track listens.
  • Libre.fm reports that I have 29,359 track listens.
  • That’s a difference of 458 tracks. I’m not sure if it’s real or not. Absolutely my top several artist show the biggest discrepancies, on last.fm my The Cure listens is at 4,057 while the same group at libre.fm is 3,985 listens, for instance.

    I figure I’ll make a comparison chart for myself tomorrow. It’s just one of those weird things I like doing, charting things. I used to make index cards of my last.fm stuff as it changed week by week. In the old days I’d keep lists of songs on the radio, and their ranking with the weekly top whatever shows. It’s cool to look at data that changes. I guess it’s not everyone’s thing, to be so into it, I have to admit that I’m overly into it. FWIW, so I’m tyring to push myself into some kind of coding stuff, learn something new & useful on the computer, as I’ve been wanting to, but just haven’t. This little exercise in Python scripting use had awakened my PHP understanding wishes, my desire to use SSH into my websites but haven’t done it, setting up a dual-boot with Linux on the second boot portion … being able to write programs for solutions to things I’d like is what I want, to make a nice script that would take my rockbox .scrobbler.log and submit it to as many services as I want easily. That would be great. How about things to aide putting music on a player, moving certain data, solving wishes and desires in how things work. Not waiting for others to do it.

    I’m there. I guess so since I put myself on libre.fm the day I truly looked at it, and got myself multiscrobbling that very day, and just a couple of days later I’ve gotten my data moved to the new service, while it remains at last.fm, I can multiscrobble as long as I want to. I just need to get my rockbox problem solved, so that I can multiscrobble. I made myself not look into that, to write this tonight instead. Which is good, since tomorrow some of the fuzzy details right now would be only even fuzzier.




    Leave a Reply. (Email address is never shared/spammed; or connect via a service.)

    This site uses Akismet to reduce spam. Learn how your comment data is processed.