Backup/restore

 
    • travelist pisze...
    • Użytkownik
    • 5 VIII 2009, 2:02

    Backup/restore

    Hi all.

    I wrote a last.fm backup script - to backup all the scrobbles to a text file and then a restore script.

    In the restore script I'm using the submissions API (http://www.last.fm/api/submissions) to basically re-scrobble the tracks. I tried it on a new account, but the tracks don't get scrobbled, even though the API returns success. Any ideas of what could go wrong?

    • snyde1 pisze...
    • Subskrybent
    • 5 VIII 2009, 5:09
    How old were the scrobbles? There is a maximum age of a small number of weeks.

    Improve your view of Last.fm - add some User Scripts.
    Did I hear that right? Mondegreens - for the misheard word. Like Odds? Can't get better than Even Odds!

    Speak your truth quietly and clearly; and listen to others, even to the dull and the ignorant; they too have their story.
    • travelist pisze...
    • Użytkownik
    • 5 VIII 2009, 10:25
    I save all the scrobbles. In my case, I have scrobbles since Feb 2009, but they can be older than that for other people. Is there some limit regarding the age of the scrobbles? As far as I can see from the docs, they only check that you don't scrobble in the future, in the past should be OK.

    • snyde1 pisze...
    • Subskrybent
    • 5 VIII 2009, 14:44
    Improve your view of Last.fm - add some User Scripts.
    Did I hear that right? Mondegreens - for the misheard word. Like Odds? Can't get better than Even Odds!

    Speak your truth quietly and clearly; and listen to others, even to the dull and the ignorant; they too have their story.
    • travelist pisze...
    • Użytkownik
    • 11 VIII 2009, 10:58
    That sucks. Anyway. I changed my restore script to use the bootstrap API (same way as the last.fm client does when you first sign up for an account and it asks you if you want to import your existing iTunes play count). Not only I get no error, but I do get a 403 error if I run the script twice - which makes me think everything is OK (it should only be run once). But still, nothing shows up in my account.

    Anyone knows what could go wrong?

  • @travelist - the bootstrap call you are doing is not something we support for third party use (i.e. anything that is not the Last.fm client) and I would not recommend using it as its behaviour is liable to change at any point in time with no notice.

    • martind pisze...
    • Alumni
    • 17 VIII 2009, 17:54
    Unfortunately we offer no restore mechanism for your scrobbles. Any undocumented method you find to work around this is probably going to break down the road, so I'm not sure it's worth spending too much time on this... sorry!

    • travelist pisze...
    • Użytkownik
    • 18 VIII 2009, 16:04
    Thanks for your replies. Yeah, I figured it's undocumented, but it looked easy in the beginning. After lots of debugging as I still couldn't get it work I decided to go the easy (and standard) way - just use the last.fm client for that! :)

    How the thing works: 1) I have a backup script that dumps all the tracks to a text file and 2) to restore them (in my case I wanted to change my username, so I wanted to restore them on a fresh account), I made another script that sets the iTunes play count to the play count from the backup file. After running that, simply use the last.fm client on a fresh account and it will do the job (import play counts from iTunes, that is).

    In case anyone else needs these scripts, they are here and here respectively.

    PS: lastfm2itunes will *overwrite* all your existing play counts from iTunes, so don't run it if you actually care about that. :)

  • Would love to get a copy of the script to backup the scrobbles to a text file. The link is broken--any chance you can fix it or post a new link?

    • toc-rox pisze...
    • Użytkownik
    • 16 II 2010, 17:12
    Maybe helpful - this saves your listening history to a XML file:
    perl lfmCOL.pl -xmlfile=lukekurtisRecentTracks.xml method=user.getRecentTracks limit=50 user=lukekurtis
    A huge amount of data ...
    Link to lfmCOL.pl

    • Killerah pisze...
    • Użytkownik
    • 9 VI 2010, 16:23
    Yes, I'm with lukekurtis, I really want those scripts so I can transfer to a new username.

    • Killerah pisze...
    • Użytkownik
    • 9 VI 2010, 16:27
    Haha! Found em! Here's the backup script: http://blog.dvl.pl/article/2010/03/04/changing-last-fm-username/
    And here's the restore script: http://lastfm.igrenier.com/?q=node/5

    Woohoo!

  • I need that

    • saaj pisze...
    • Użytkownik
    • 3 III 2013, 18:02

    The userscript I recently wrote

Anonimowi użytkownicy nie mogą wysyłać wiadomości. Zaloguj się lub utwórz konto, aby móc wysyłać wiadomości na forum.