Author Topic: LastFM changes to API (02/05/19)  (Read 4742 times)

stardepp

  • Full Member
  • ***
  • Posts: 220
Ok I understand. Nevertheless, it remains my favorite program to listen to music.

jspaceman009

  • Newbie
  • *
  • Posts: 2
To the people requesting certain old functionality from last.fm that you liked using. Please stop. It wont be coming back unless last.fm decide to change their API policy which seems unlikely

I understand you've been under pressure to resolve the recent issues and like I said I'm very grateful. I'm assuming that this comment is direct at me (and others) because it followed my recent post. I'm not fully aware or experienced with the inside of the software. I wasn't sure if there was a "box left unchecked" because the options menu does list methods or potential sources to retrieve or gather genre metadata. Unfortunately, those methods do not function. Again, I have no experience with this other than I am a free consumer of the MB software. I wasn't sure if last.fm was "out" and these alternates were "in" so, I wanted to notify you that they were not functioning. Thanks for the software updates and the effort to resolve any issues. I'll have to personally find another way to gather this data efficiently. Thanks.

redwing

  • Guest
Isaac Stern, i get 2 suitable images and there are none for Igor Markevitch

edit:
for the primary picture only, in the case of Isaac Stern, the primary page picture is not suitable so its excluded
for the rotating artist pictures there are 2 others that are in fact suitable but searching all pictures is too slow for the task of getting a primary picture
ie. no pictures this is the expected result

Just tried again with a local picture saved for him. It still retrieves no pictures. So even when local primary picture is already present and multiple pictures are available from the wikipedia, if none of them is suitable for primary picture, no pictures get retrieved?

It's the same when fanart.tv supplies first picture, then it doesn't retrieve any pictures from wikipedia even if they are available.
I think even a low-quality picture with portrait orientation would be still better than nothing and I wouldn't mind if such picture is shown as either primary or rotating artist picture for the gallery. Actually it used to show lots of low-quality last.fm pictures.
Of course if we can have additional sources like Google, Spotify or iTunes, that would be a different story.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 29770
For backdrops of obscure artists, Google would work much better.
I have added google and enhanced wikipedia to get all candidate pictures. Spotify doesnt have an artist picture API that i know of and iTunes only has a hack solution which I wont implement.

https://getmusicbee.com/patches/MusicBee33_Patched.zip

I am not promising to keep google, as I can already see it can produce some rubbish results depending on the artist name.
But equally it can get some really good results as well
Last Edit: May 13, 2019, 08:04:59 PM by Steven

redwing

  • Guest
Thanks! I really like it. But as you said it also shows irrelevant pictures a lot. Probably some people won't like it. How about adding a source option for google in addition to flickr?

Also I see Ban picture command will be frequently used if Google is enabled. Does it ban the picture only for the artist or for all artists? If it's the latter, can it ban the picture just for the artist? Or it could provide both options for ban command as it may depend on the retrieved picture.

redwing

  • Guest
It's working pretty well for well-known artists. Also tried artists with a general name like police, prince, queen, etc. and most of the retrieved pictures were about the specific artist. Love was the only exception as it never showed the picture of the band.

BTW what's the current rotation period? Clicking on "next picture" now starts working pretty soon and keeps showing different pictures but the default period feels too long.

zkhcohen

  • Full Member
  • ***
  • Posts: 249
For backdrops of obscure artists, Google would work much better.
I have added google and enhanced wikipedia to get all candidate pictures. Spotify doesnt have an artist picture API that i know of and iTunes only has a hack solution which I wont implement.

https://getmusicbee.com/patches/MusicBee33_Patched.zip

I am not promising to keep google, as I can already see it can produce some rubbish results depending on the artist name.
But equally it can get some really good results as well


Spotify does:

  - For other functions like artist picture retrieval my offer is to provide an API if someone is willing to write a plugin

A temporary workaround would be to use the "Images" key from the Artist Object in the Spotify API:

https://developer.spotify.com/documentation/web-api/reference/artists/get-artist/

https://developer.spotify.com/documentation/web-api/reference/object-model/#image-object


You would also want to use the Client Credentials Flow for the higher rate limit.


It looks like Discogs' API is another option, and they have a published rate-limit of 60 requests per-minute, per-IP:

https://www.discogs.com/developers/#page:home,header:home-rate-limiting


Outside of a sketchy web-scraper, I don't see any options that wouldn't require some form of authentication.


Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 29770
Spotify does:
Thanks - I am using the artist api already but I believe its only square thumbnails and not wide pictures suitable for backdrops. Correct me if I am wrong about that

For discogs the pictures are quite small and i recall they were applying an app level limit for artwork that was quite low although they might have changed that
Last Edit: May 13, 2019, 10:07:41 PM by Steven

Mr. Trev

  • Sr. Member
  • ****
  • Posts: 258
Great to see how well this is progressing!
I just wanted to get a confirmation about the whole Spotify api thing. Do we need the Spotify plugin or is it baked into the core now? I also remember reading earlier that we need to have a Spotify account for it to work, I take it that's still the case?

zkhcohen

  • Full Member
  • ***
  • Posts: 249
Spotify does:
Thanks - I am using the artist api already but I believe its only square thumbnails and not wide pictures suitable for backdrops. Correct me if I am wrong about that

For discogs the pictures are quite small and i recall they were applying an app level limit for artwork that was quite low although they might have changed that

My mistake. I'm not sure if that's possible.

redwing

  • Guest
I just wanted to get a confirmation about the whole Spotify api thing. Do we need the Spotify plugin or is it baked into the core now? I also remember reading earlier that we need to have a Spotify account for it to work, I take it that's still the case?

You don't need to do anything else yourself as MB is already using it in the background with the latest patch.

@Steven;

There's some issue with Spotify as a fallback for artist thumb. It often retrieves an album cover for artist thumb. The problem is the user may not own the album (of the retrieved cover) in the library, then it ends up showing a wrong cover (instead of the album the user owns) for artist with no artist thumb. Also it won't re-try retrieving a thumb for the artist since now it has a thumb. Try with the following artists.

e.g.
Russell Smythe
Samuil Feinberg
Stefan Milenkovich

[edit]
Yep, I just checked my local thumb folder and a lot of new pictures (since the update) are album covers.
Last Edit: May 14, 2019, 12:47:09 AM by redwing

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 29770
Spotify is definitely returning an album cover for those artists in place of the artist picture.
There isnt a way for MB to tell thats what has been done.
You can always paste your own artwork in place
Last Edit: May 14, 2019, 06:01:29 PM by Steven

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 29770
I am told there is a change of plan from last.fm
They will now exclude track love and user play count sync from rate limiting from the end of this week. However they want me to use the existing API key, so that means similar artists and artist bio's will be unreliable for some months.
Fortunately I have now added in fallback functions, so if last.fm fails, the data is now retrieved from other sources.
As previously mentioned, all artwork retrieval from last.fm is no longer allowed and the replacement is wikipedia, and google (along with fanart.tv which still works)

zkhcohen

  • Full Member
  • ***
  • Posts: 249
I am told there is a change of plan from last.fm
They will now exclude track love and user play count sync from rate limiting from the end of this week. However they want me to use the existing API key, so that means similar artists and artist bio's will be unreliable for some months.
Fortunately I have now added in fallback functions, so if last.fm fails, the data is now retrieved from other sources.
As previously mentioned, all artwork retrieval from last.fm is no longer allowed and the replacement is wikipedia, and google (along with fanart.tv which still works)


Thanks for your persistence with this issue.

Glad to hear that we're slowly getting somewhere with LastFM.

magpy

  • Newbie
  • *
  • Posts: 2
Play Similar and Auto DJ still aren't working for me with the latest patch. I just get tracks by the original artist.