getTopSongs REST API

General discussions.

Moderator: moderators

getTopSongs REST API

Postby rich600 » Sat Jul 16, 2016 7:55 am

Hi,

I'm starting to use getTopSongs to scrape the top songs for an artist from Last.FM.

It seems to be a bit hit and miss. For instance "coldplay" returns nothing, but "Coldplay" works. R.E.M gets nothing, but REM brings back a short list (which is shorter than the Last.FM list).

I can use the getArtistInfo with an ID and it brings back information accurately, but getTopSongs requires a name. I wouldn't even mind if getArtistInfo returns the Last.FM name of the artist that was used subsequently in getTopSongs but that's not the case.

Got any tips on using this feature?

Cheers
Rich
rich600
 
Posts: 141
Joined: Tue Aug 12, 2014 9:54 pm

Re: getTopSongs REST API

Postby acroyear » Sat Jul 16, 2016 11:35 am

I don't know why getTopSongs requires a name. Yes, it is picky on the name, and if you plan to use it, you'll need to tweak your ID3 tags and possibly folder names.

It doesn't return all top songs: it returns what top songs you have in your collection, similarly just what it can match by nearly-exact name. If you have older files that cropped off the name in the ID3 (converted from ID3v1), they might not match.

If you have more than one of a name in a collection, you have no control over the one it picks except by changing the ID3 title of it (e.g. if you have a studio and live version, that's why some gracenote CDDB instances have [Live] at the end of every title on a live album, so the studio one matches last.fm first).

After changing the ID3, you may need to re-run a scan for it to recognize the changed settings.
--
Joe Shelby
http://subfiresuite.com/
http://subfireplayer.net/
User avatar
acroyear
 
Posts: 779
Joined: Wed Mar 27, 2013 8:05 pm
Location: Northern, VA

Re: getTopSongs REST API

Postby rich600 » Mon Jul 18, 2016 8:01 am

Hi,

thanks for the info. Looks like a feature thats got a lot of promise but that can be improved. I haven't checked the underlying Last FM API - it might be restricted there.

Cheers
Rich
rich600
 
Posts: 141
Joined: Tue Aug 12, 2014 9:54 pm


Return to General

Who is online

Users browsing this forum: No registered users and 8 guests