Page 1 of 1

getTopSongs REST API

PostPosted: Sat Jul 16, 2016 7:55 am
by rich600
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

Re: getTopSongs REST API

PostPosted: Sat Jul 16, 2016 11:35 am
by acroyear
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.

Re: getTopSongs REST API

PostPosted: Mon Jul 18, 2016 8:01 am
by rich600
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