Blog

RSS
  • How to import your LibreFM data into LastFM

    4. Jun. 2012, 19:01

    I found the solution in the web

    CREEVA'S WORLD 2.0

    ---

    Requirements:

    A last.fm account
    Python installed
    Qtscrob
    A spreadsheet package
    A text editor


    1. Go and download the lastexport.py script from this page

    2. Run the command “python ./lastexport.py –user USERNAME” and replace USERNAME with your account (or any other account) you want to export.

    3. When the script completes it will create a file named exported_tracks.txt, rename the extension to .csv so you can easily open it your spreadsheet. This file is tab-delimited.

    4. You should now have a spread sheet opened with all the data nicely arranged in columns. The first column is the timestamp. The second column is the track name. The third column is the artist name. The fourth column is the album name. The fifth column is the Musicbrainz artist ID. The last Column is the Musicbrainz song ID.

    You will now need to rearrange these columns to the following order:

    - artist name
    - album name (optional)
    - track name
    - track position on album (optional)
    - song duration in seconds
    - rating (L if listened at least 50% or S if skipped)
    - unix timestamp when song started playing
    - MusicBrainz Track ID (optional)
    For the track position column I just auto-filled 1′s in all the cells down the sheet. For the song duration column I filled in 180 (3 minutes) in all the cells down the sheet. For the rating columns I filled in L in all the cells down the sheet.

    The Unix timestamp is a tricky one.If any tracks on your list are older than fourteen days old you will need to change the time stamp or last.fm will ignore those submissions.

    Previously I had a friend generate a list of Unix times 180 seconds apart. I copied this in, but realized my 20k tracks took the time back older than fourteen days. I took the latest 2k times and just copy and pasted those 10 times down the list. To find the latest Unix time and understand the time stamps go to this site.

    At this point you should have all the columns filled out in the correct order to create a .scrobbler.log file. The website everyone points to for the .scrobbler.log file format details seems to be down when I was doing this. Here is a link to the page in the Internet Archive.

    I do have a theory with this method that all the tracks can have the same time stamp. One of the earlier methods I tried did not allow that, so if you don’t want to figure out a bunch of random time stamps it is something you can test with. The difference in this article is how QTscrob is going to submit these tracks compared to how Libre.fm did in my other article.

    5. Select all the data in the spreadsheet and copy and past it straight into a text editor. You are going to add the following lines to the very top of the new file you created:

    #AUDIOSCROBBLER/1.0
    #TZ/UTC
    #CLIENT/Rockbox h3xx 1.1
    These lines are required for the file to be recognized as a .scrobbler.log file.

    6. You can now save the file. You must choose a Unix format or a format that will add hard breaks at the end of each line. I believe this is what caused the file to fail on me earlier. If you editor allows it (mine did not) you can save the file name as .scrobbler.log (remember the “.” at the beginning of the file name.

    7. If your text editor did not allow to save the file name as .scrobbler.log you must rename your file to this at the command line or terminal level.

    8. Start up QTscrob and select open .scrobbler.log. Browse to the directory where the file is. It is only looking for the containing directory so you will not be opening the file name directly.

    9. At this point (if you have done everything correctly and I’m not going to troubleshoot files if you did not) you should see a list of tracks in the QTscrob interface. If everything looks good just click submit. This may take a few minutes depending on how many tracks you have.


    http://creeva.com/2012/03/08/i-have-successfully-merged-last-fm-accounts-here-is-a-howto/

    thx to the author Creeva

    Two hints: Use an text editor like gedit under linux to build a .scrobbler.log text file. To upload the file i used http://scroblr.net/

    This works for me like a charm.

    Happy importing :-)