Last.fm Playcount Import (2010-03-28) [MM3/4]

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Playcount Import [MM3]

Post by Psyker7 »

Coded this up to use recenttracks recently added to the last.fm API.

Just want to get a test done on my own username before I upload it.... Loading 510 odd xml pages takes a while! They have a limit on the number of tracks per xml page of 50.... so for those with large track histories this will take a long time to download all the xml files!

Will update when mines finished :)
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Playcount Import [MM3]

Post by Psyker7 »

Capped at the moment so I'm getting timeouts... will have to wait for another day or two.
I'm thinking I'll need to get a way to cache the xml files, otherwise this simply won't be practical to run reguarly like I currently do. Fun times...
CowMix
Posts: 5
Joined: Tue Nov 10, 2009 12:58 pm

Re: Last.fm Playcount Import [MM3]

Post by CowMix »

Sorry if my questions have been answered before, but when running the script I've noticed that some of my songs have a higher play count of media money then last.fm, is it possible to update my last.fm play count the a higher mediamonkey value? Also is it possible to run this script every time I run mediamonkey or on some kind of schedule because I have a scrobbler on my phone as well and I want to sync the play counts between my computer and phone.

Thanks :)
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Playcount Import [MM3]

Post by Psyker7 »

Version 3.0 is out!

http://psykar.com/scripts/

' Changes: 3.0
' - Added support for last.fm's recent track history

It is *very* slow at the moment, and i'd recommend you do it while playback is stopped, or some tracks may be skipped, as every single xml page is regenerated each time a new track *starts* playing, so the pagination gets screwed up (I'm impressed but because they don't let you download it in a single file it is annoying in this respect)

I'm looking into making a local cache xml file of the track history and only adding updates to this file so less has to be downloaded, but it's going to take me a while, as quite busy at the moment.

CowMix wrote:Sorry if my questions have been answered before, but when running the script I've noticed that some of my songs have a higher play count of media money then last.fm, is it possible to update my last.fm play count the a higher mediamonkey value? Also is it possible to run this script every time I run mediamonkey or on some kind of schedule because I have a scrobbler on my phone as well and I want to sync the play counts between my computer and phone.

Thanks :)
Without creating fake scrobbles to last.fm this is not possible.
It's not something that belongs in this script either IMO, and to be honest it's quite possibly against last.fm's policies - only actual played songs are supposed to be uploaded.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Last.fm Playcount Import [MM3]

Post by nynaevelan »

Psyker7:

Songbird has a plugin that downloads the Loved Tracks from Last.FM and inserts them into a playlist. Would it be possible to add this feature to the script or should I make a separate request in the forum?? I wouldn't need it to make any changes to the Loved status, I would just like to have a playlist available to play and to use to change the status on Last.FM.

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Last.fm Playcount Import [MM3]

Post by trixmoto »

Does it actually download the tracks, or just a list of them?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Last.fm Playcount Import [MM3]

Post by nynaevelan »

It creates a playlist in Songbird, which is essentially only a list, which is all I need since I obviously already own the tracks, CR infringements.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Playcount Import [MM3]

Post by Psyker7 »

nynaevelan wrote:Psyker7:

Songbird has a plugin that downloads the Loved Tracks from Last.FM and inserts them into a playlist. Would it be possible to add this feature to the script or should I make a separate request in the forum?? I wouldn't need it to make any changes to the Loved status, I would just like to have a playlist available to play and to use to change the status on Last.FM.

Nyn
Better suited to a separate script I think. I'd try my hand at it, but it'll be a week or two, unless someone else wants to :) (new thread in order though yes)
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Last.fm Playcount Import [MM3]

Post by nynaevelan »

Thanks I'll do that.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Funkafonik
Posts: 58
Joined: Fri Feb 13, 2009 12:33 pm

Re: Last.fm Playcount Import [MM3]

Post by Funkafonik »

Anyone knows if there's a script to update MM's internal play history from the newly available Recent Tracks from Last.FM?
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Last.fm Playcount Import [MM3]

Post by nynaevelan »

Bex's Add/Remove Playstat script.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Funkafonik
Posts: 58
Joined: Fri Feb 13, 2009 12:33 pm

Re: Last.fm Playcount Import [MM3]

Post by Funkafonik »

I use that script already, but is there a way to get all the play histories from Last.FM?
I won't go through 5 years of stats by hand to add them one by one with Bex's script...
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Last.fm Playcount Import [MM3]

Post by nynaevelan »

No sorry I don't think that exists but I thought this one updated dates?? I do not know since I always say no to the dates portion. Or you could as Pstrykr if he would add the feature.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Last.fm Playcount Import [MM3]

Post by Psyker7 »

Funkafonik wrote:I use that script already, but is there a way to get all the play histories from Last.FM?
I won't go through 5 years of stats by hand to add them one by one with Bex's script...
At the moment it only updates the last played time and the play count now last.fm has exposed the entire play history I am looking at doing what you suggest. Hopefully I can use bex's script somehow rather than duplicating functionality.
antietam
Posts: 11
Joined: Mon Aug 10, 2009 6:12 am

Re: Last.fm Playcount Import [MM3]

Post by antietam »

Unfortunately I cannot use this script anymore. In the beginning, it goes well and loads my recent tracks from the last.fm website. Then, suddenly, on page 552 of 3443 I receive an error warning, something like "You have an error: an xml-document must have a top level element" and then - "Last.FM Query failed". Finita. Nothing happens.

Will you please tell me how I can solve this problem.
Post Reply