Getting Last.FM Played #'s?

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Getting Last.FM Played #'s?

Postby xioustic » Sun Feb 25, 2007 6:02 am

Is there any way to get the playcounts for individual songs on Last.FM? I wanted to use the AutoRateAccurate script but since I've imported my library into MM I've lost my Played #'s. The only thing I can think of that keeps an accurate count of the number of times I've played a song is my Last.FM/Audioscrobbler account. Is there any way I can get MM to import the played # from Last.FM?

Would this need to be done with a script?

Can I do this by hand?
xioustic
 

Postby Lowlander » Sun Feb 25, 2007 1:25 pm

Yes, this is something that requires a script. Of course last.fm would need to have a method to be able to retrieve this information.
Lowlander (MediaMonkey user since 2003)
Lowlander
 
Posts: 43647
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Postby Spazz » Sun Feb 25, 2007 3:25 pm

Yes, I would pay someone dearly if they could write this. I know last.fm has webservices for lots of things but I never get an answer when i ask about retrieving this particular kind of info.
Image
Spazz
 
Posts: 243
Joined: Tue Jan 11, 2005 9:49 pm

Postby m0nkiii » Mon Feb 26, 2007 5:40 pm

http://www.audioscrobbler.net/data/webservices/
There you find all xml-files you need to get all your plays.

I've done my own last fm profile. I added all my plays into a sql database.
But I didnt get exactly the same results. A small amount plays are wrong or something.

Search for example Disturbed and you can see which weeks I played them and how much.
http://m0nkiii.apakossa.org/Admin/index ... m&id=album

There is some bugs... :)

I'm kinda new here so making a script is to advanced for me now
m0nkiii
 
Posts: 15
Joined: Mon Feb 26, 2007 1:48 pm
Location: Swiiiiden

Postby Teknojnky » Mon Feb 26, 2007 6:07 pm

its probably because MM tracks not only how many times a track was played, but each time WHEN it was played.

Frankly, I think it is just a little bit too obsessive if someone feels they 'must' have every single play added to MM. What are you going to do about radio and other plays?

Anyway, for play track stats that are already in mm, you should check out bex's advanced play history and stats script.

http://www.mediamonkey.com/forum/viewtopic.php?t=12368
Teknojnky
 
Posts: 5521
Joined: Tue Sep 06, 2005 11:01 pm

Postby Spazz » Tue Feb 27, 2007 12:16 pm

It's not so much about being obsessive. When you the autorateaccuratescript and you don't have a played library it cuts the usefullness alot. This would jsut speed up the processs to accurate ratings.
Image
Spazz
 
Posts: 243
Joined: Tue Jan 11, 2005 9:49 pm

Postby gtbuzz » Tue Feb 27, 2007 12:36 pm

I agree that this would be very cool script to have because it's the 1 piece of information that is not stored in the tracks. For example I rescanned my music for MM3. All of my tag info was still there but of course all my playcounts are now zero. I'd love to be able to pull that data down from last.fm. Plus this would include counts from other computer, iPod, and listening on last.fm.

One issue to work out is when you have multiple copies of the same song (studio/live versions), which one gets the play count upped. Personally I wouldn't care if they all did, because I care how often I've listened to a song, not the particular version of a song.
Image
gtbuzz
 
Posts: 129
Joined: Mon Jul 18, 2005 11:09 am

Postby Jugdish » Tue Feb 27, 2007 1:26 pm

Unfortunately, it doesn't look like there's anyway to get ALL the information last.fm has on your track plays.

If you were to use last.fm's web services, you will only be able to get playcounts for your top 50 most-played tracks. And if you want the timestamp each track was played as well, that information is only available for the last 10 tracks played.

You could get more information (though still limited) if you got the data from your actual last.fm profile rather than through the web services. Playcounts are available for your top 500 most-played tracks, and timestamps for the track plays go back exactly 2 weeks.

If you wanted to be really hardcore (and didn't care about timestamps), you could parse through your weekly charts for every single week and accumulate the track playcounts. But again, the weekly charts are limited to your top 500 most-played tracks, so assuming you never play more than 500 tracks per week you could theoretically get a complete set of playcount info with this method.

EDIT: My bad, after taking a closer look at the web services, it appears that it if you use the weekly track chart data (weeklytrackchart.xml) then it is NOT limited to only 500 tracks/week, so you should be able to get a complete set of playcount data regardless of how much you listen to each week ;)
Last edited by Jugdish on Tue Feb 27, 2007 1:51 pm, edited 1 time in total.
Jugdish
 
Posts: 13
Joined: Tue Feb 27, 2007 12:19 pm

Postby m0nkiii » Tue Feb 27, 2007 1:36 pm

Jugdish wrote:Unfortunately, it doesn't look like there's anyway to get ALL the information last.fm has on your track plays.

If you were to use last.fm's web services, you will only be able to get playcounts for your top 50 most-played tracks. And if you want the timestamp each track was played as well, that information is only available for the last 10 tracks played.

You could get more information (though still limited) if you got the data from your actual last.fm profile rather than through the web services. Playcounts are available for your top 500 most-played tracks, and timestamps for the track plays go back exactly 2 weeks.

If you wanted to be really hardcore (and didn't care about timestamps), you could parse through your weekly charts for every single week and accumulate the track playcounts. But again, the weekly charts are limited to your top 500 most-played tracks, so assuming you never play more than 500 tracks per week you could theoretically get a complete set of playcount info with this method.


Take a look at my site: http://m0nkiii.apakossa.org/Admin/index ... m&id=album
I've parsed through all weeks and put all tracks in a sql database :)

But as you say, no timestamps. But is that a problem. Just set the timestamp to whatever. Tracks after 500 are probably just played once and won't have that big affect anyway. It's the most played tracks you're after.
m0nkiii
 
Posts: 15
Joined: Mon Feb 26, 2007 1:48 pm
Location: Swiiiiden

Re: Getting Last.FM Played #'s?

Postby Funkafonik » Tue Feb 10, 2009 8:29 am

*bump* Any new development on this? it's been a while and lots happened at Last.FM in the meantime with the new Library and auto-corretion going on. I see there's even a Last.FM node available, any ways to now import playcounts to MM?
Funkafonik
 

Re: Getting Last.FM Played #'s?

Postby m0nkiii » Tue Feb 10, 2009 11:13 am

Funkafonik wrote:*bump* Any new development on this? it's been a while and lots happened at Last.FM in the meantime with the new Library and auto-corretion going on. I see there's even a Last.FM node available, any ways to now import playcounts to MM?


Sorry to say that I don't use MM anymore. So there has not been any development. (I got a notification in my mail)
edit: oh, I realized now that this wasn't about my script :P

On the other hand I've started an other project :)
I like stats so I've done a stats-site for Last.FM users. I read in ALL tracks and presents some stats.
The data in my database could be used to import it to MM, but like I said I don't use it anymore. If someone does a script that could import to MM I can help with the tracks.
http://lastfm.shikaka.net/
Last edited by m0nkiii on Tue Feb 10, 2009 11:36 am, edited 1 time in total.
m0nkiii
 
Posts: 15
Joined: Mon Feb 26, 2007 1:48 pm
Location: Swiiiiden

Re: Getting Last.FM Played #'s?

Postby Teknojnky » Tue Feb 10, 2009 11:25 am

So then, what are you using now?
Teknojnky
 
Posts: 5521
Joined: Tue Sep 06, 2005 11:01 pm

Re: Getting Last.FM Played #'s?

Postby m0nkiii » Tue Feb 10, 2009 11:32 am

Teknojnky wrote:So then, what are you using now?


Spotify! or Last.fm :)
m0nkiii
 
Posts: 15
Joined: Mon Feb 26, 2007 1:48 pm
Location: Swiiiiden

Re: Getting Last.FM Played #'s?

Postby Psyker7 » Mon Feb 16, 2009 11:48 pm

I'm currently in the process of hacking together some pieces to get this working as a single vbscript.

Problem I'm coming up against at the moment is when accessing last.fm's 2.0 xml feeds.

The error I get is "System does not support the specified encoding"
Not quite sure how to get around this - if I save the xml page locally, it works fine.

Code snippet:
Code: Select all
   
         xmlURL = "http://ws.audioscrobbler.com/2.0/?method=user.getWeeklyChartList&user=" & fixurl(user) & "&api_key=daadfc9c6e9b2c549527ccef4af19adb"
      

   Set xmlDoc = CreateObject("MSXML2.DOMDocument.3.0")

   xmlDoc.async = False
   xmlDoc.Load (xmlURL) ' <<<<---- load last.fm xml occurs here

   If (xmlDoc.parseError.errorCode <> 0) Then
      Dim myErr
      Set myErr = xmlDoc.parseError
      MsgBox("You have error " & myErr.reason)
   Else
      'Do more stuff here
   End If

The error is triggered, when I don't understand why.

Example xml page:
http://ws.audioscrobbler.com/2.0/?metho ... ef4af19adb
which appears fine to me :|

Any hints appreciated!

edit: thought i'd add - using the 2.0 api as apparently the 1.0 api no longer lists playcounts O,o

edit #2: found some info here: http://support.microsoft.com/kb/304625 but not quite sure how to implement this - bit beyond my knowledge of msxml

edit #3: (going overboard on edits... meh) - What is strange is the 1.0 API does work to parse the XML at least, it just doesn't have the data I need - eg: http://ws.audioscrobbler.com/1.0/user/p ... kchart.xml
Psyker7
 
Posts: 254
Joined: Sat Mar 03, 2007 8:00 am

Re: Getting Last.FM Played #'s?

Postby trixmoto » Tue Feb 17, 2009 7:28 am

When I'm making calls to Last.Fm I always use "Microsoft.XMLDOM" not "MSXML2.DOMDocument.3.0". I've not played with 2.0 calls yet so maybe this won't help you but it's worth a go.
Download my scripts at trixmoto.net.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE
trixmoto
 
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK

Next

Return to Need Help with Addons?

Who is online

Users browsing this forum: No registered users and 17 guests