getmusicbee.com

General => General Discussions => Topic started by: bammy on May 03, 2019, 09:36:15 AM

Title: LastFM changes to API (02/05/19)
Post by: bammy on May 03, 2019, 09:36:15 AM
I was having a popup I've never seen before: "29 : Rate Limit Exceded - Your IP has made too many requests in a short period, exceeding our API guidelines".

Seems like Last.FM has changed some API, as announced here: https://getsatisfaction.com/lastfm/topics/api-announcement-dac8oefw5vrxq

As of right now, it's affecting my ability to "Love" tracks in my library.

(https://i.imgur.com/KvXdtMa.png)
Title: Re: LastFM changes to API (02/05/19)
Post by: phred on May 03, 2019, 02:01:30 PM
I wouldn't call this a bug. LastFM changed the terms of use for their API and you have exceeded the new limits. I doubt there's anything Steven can do legally to get around the new limits and I wouldn't expect him to try to circumvent the new terms of use.
Title: Re: LastFM changes to API (02/05/19)
Post by: bammy on May 03, 2019, 02:13:02 PM
I wouldn't call this a bug. LastFM changed the terms of use for their API and you have exceeded the new limits. I doubt there's anything Steven can do legally to get around the new limits and I wouldn't expect him to try to circumvent the new terms of use.
Right. Well for the moment I am unable to "Love" 2 tracks in a row. Perhaps a way to supply our own Last.FM API keys?
Title: Re: LastFM changes to API (02/05/19)
Post by: frankz on May 03, 2019, 02:22:32 PM
The announcement you linked to doesn't seem to have anything to do with use limits.

==
While we allow API users to have access to a lot of data through the API, it has always been against our API Terms of Use for third parties to use audio, audiovisual, images or artwork. In some instances, some data may have been indirectly accessible through a small number of API calls, and so as part of the recent API clean-up, we have corrected that anomaly.
==
Title: Re: LastFM changes to API (02/05/19)
Post by: bammy on May 03, 2019, 02:28:50 PM
The announcement you linked to doesn't seem to have anything to do with use limits.
I see, my main panel with Artist picture does not work anymore - I guess Last.fm has rate-limited me, thus not being able to use any other API (such as "Loving" tracks). I've disabled my Artist Picture panel for now.
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 03, 2019, 02:58:34 PM
They said it's a daily limit. Probably it will work again for you tomorrow.

See: https://getsatisfaction.com/lastfm/topics/api-limit?topic-reply-list%5Bsettings%5D%5Bfilter_by%5D=all&topic-reply-list%5Bsettings%5D%5Breply_id%5D=20087870#reply_20087870
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 03, 2019, 06:18:24 PM
I havent used the last.fm functionality myself for ages and trying now I was immediately rate limited. So I guess it has been done against the MusicBee api key.
To be honest I cant really be bothered with last.fm if they want to make things difficult so I think I will remove all functionality except the scrobbling and if they decide to make that problematic I will also remove that.
Title: Re: LastFM changes to API (02/05/19)
Post by: frankz on May 03, 2019, 06:34:00 PM
This may be a temporary or localized issue rather than the result of any policy change as suggested by the OP.  I'm not having any trouble scrobbling, loving tracks or generating playlists based on MB's Last.fm functions, and I think if it was widespread we'd have a rash of reports of it.

Is "Simliar to <Artist>" based on last.fm? That's working for me too.

The change may affect getting album art and artist art from last.fm, though.  I don't do artist art, but album art from them still seems to be working. 
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 03, 2019, 06:51:30 PM
No similar to and album covers are also immediately failed. You will be alright for a while but the cached data will eventually expire
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 03, 2019, 07:23:32 PM
I think you might want to wait and see what's going on for a few weeks before making any drastic decisions, as their changes were made very recently and app developers now started complaining about it. If they completely disallow to retrieve any data (images and bios), the impact on MB will be significant. But they are still working including album covers as of now.
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 03, 2019, 08:53:21 PM
Tried with Adele's artist image & 25 album cover.
Sometimes it returns "Rate Limit Exceeded - This application has made too many requests in a short period".
And sometimes it works just fine, even after a few seconds later, and then not working again at the next trial.
Keeps going on and off.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 03, 2019, 08:56:50 PM
MB is already throttling requests as per Last.fm API guidelines. It fails consistently for me, right from the very first time I tried tonight.
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 03, 2019, 09:04:30 PM
I don't know, but I downloaded several covers and artist images during my tests though it didn't work many other times.
Title: Re: LastFM changes to API (02/05/19)
Post by: frankz on May 03, 2019, 09:06:06 PM
The announcement seems to be saying that "images or artwork" shouldn't have been part of the API and were accidentally served.  I'd expect those things to fail going forward.

I think (hope, actually - wishful thinking because I want it to be true) that the other errors popping up are bugs introduced by whatever they did to "fix" images and artwork and those other things being served when they didn't want them to be, and that those errors will go away on their own.
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 03, 2019, 09:09:44 PM
To me it's not clear how their rate limit for apps is working. It might be re-evaluated per several seconds.
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 04, 2019, 08:30:42 AM
Most of their services are still working fine for me.

They said:

Quote
The announced change has already been deployed, and was designed to ensure compliance with our API terms of service with as minimal disruption to app developers as possible.  My understanding is that there are no further changes planned, so you shouldn't expect anything else from the api to change in the foreseeable future.

If what we've seen since yesterday is how it's supposed to work, then I think they may be using two levels of rate limiting:

- user-level rate limit: for scrobbling and loving tracks per IP: daily limit  
- app-level rate limit: for retrieving images, album, artist info, etc.: seems using a very short time window and working again if the usage from the app falls back below the limit.

As they don't explicitly state that they will no longer allow any access to images, etc. and those services are still working, they may be just trying to minimize the impact from abusive usages by introducing those rate limiting.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 04, 2019, 08:52:32 AM
I just tried now and all seems to be fine. I imagine you are right about some sort of app level restriction and if anyone finds details on that please let me know.
I will consider reducing the requests on last.fm for artwork once i have some details on the rate limiting
Title: Re: LastFM changes to API (02/05/19)
Post by: ost on May 04, 2019, 04:36:05 PM
Each time when try to mark track as "Loved" I got this pop-up window:

(https://i.imgur.com/mOWDHrZ.png)
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 04, 2019, 04:59:52 PM
Steven, does scrobbling request require MB's API key? Then all scrobbling & loving via MB must be counting towards MB's usage rather than each user's usage. If that's the case, you might want to consider separating the feature to their own scrobbler app.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 04, 2019, 05:38:04 PM
Steven, does scrobbling request require MB's API key?
yes, every last.fm function used by MB is done via an API key.

I have written to last.fm to request an app limit increase. I expect they will come back with some conditions attached so dont be surprised if some functionality will need to be removed.
Title: Re: LastFM changes to API (02/05/19)
Post by: frankz on May 04, 2019, 11:43:29 PM
I have written to last.fm to request an app limit increase. I expect they will come back with some conditions attached
I'd expect last.fm's response to an email that starts "I'm the developer of MusicBee..." to be "Yes, sir. How can I help you?" 

Last.fm's whole business model is collecting data and then, for money, feeding it back to the user.  As one of the premiere Windows music players and library managers, MusicBee feeds them the data they need to make what they charge people for worthwhile. 

I'd expect that the API limits are for tools who make scam scrobblers that are used to goose band/label stats and get them recommended more.  I think a legit app shouldn't have any problem getting a waiver.

If they're smart, they're thrilled to be so tightly integrated into MB.  It makes the data they charge for that much more reliable and useful.
Title: Re: LastFM changes to API (02/05/19)
Post by: Ableet on May 05, 2019, 06:34:17 AM
Would these API changes be affecting the ability for MusicBee to synchronise love/play counts, per chance? Ever since the update, my loves are fully wiped upon restarting, and the play/love synchronisation regularly fails. Such a shame if so.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 05, 2019, 08:44:13 AM
If they're smart, they're thrilled to be so tightly integrated into MB.  It makes the data they charge for that much more reliable and useful.
yes, i am quite surprised at how they have handled this so far - i guess they must think that spotify is the only one that really matters but i expect that MusicBee is one of their top generators of scrobbles/ likes etc below spotify.
Title: Re: LastFM changes to API (02/05/19)
Post by: ost on May 05, 2019, 10:19:02 AM
Steven, is it possible to do that Love/Banned ratings also can be saved as tags inside files as a regular Ratings?
After latest last.fm API changes all my loved tracks are ruined  :(
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 05, 2019, 10:31:28 AM
Steven, is it possible to do that Love/Banned ratings also can be saved as tags inside files as a regular Ratings?
After latest last.fm API changes all my loved tracks are ruined  :(
You dont help your case by exaggerating. All your loved tracks are not ruined. It will only be the case that newly loved tracks where the love status could not be saved via the last.fm api that MB will not save the loved status otherwise it will become out of sync with whats at last.fm.
Depending on the response from last.fm i may remove all interation with last.fm in which case the love status will only be saved in MB
Title: Re: LastFM changes to API (02/05/19)
Post by: ost on May 05, 2019, 12:28:16 PM
Depending on the response from last.fm i may remove all interation with last.fm in which case the love status will only be saved in MB

It will be great if it will be stored in MB - now I lost all "Loved" marks at my library.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 05, 2019, 05:38:55 PM
i made a change so when doing a full sync (manual or automatic) sync of loved tracks, it will abort the operation when a rate limited error is reported

https://getmusicbee.com/patches/MusicBee33_Patched.zip
unzip and replace the existing musicbee files
Title: Re: LastFM changes to API (02/05/19)
Post by: ost on May 06, 2019, 09:33:43 AM
Hmm, still not working for me, did a manual sync of loved tracks with last.fm - no results. Sync at start up also not working.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 06, 2019, 10:19:55 AM
The change was so loved tracks are not reset when the rate limit error occurs. The loved tracks will only resync if there is no rate limit error.
I have made one further change so the same is done for similar artists
https://getmusicbee.com/patches/MusicBee33_Patched.zip
unzip and replace the existing musicbee files
Title: Re: LastFM changes to API (02/05/19)
Post by: stardepp on May 07, 2019, 06:46:13 AM
Everything runs smoothly again with Last.FM, thanks for that Steven  :)
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 07, 2019, 06:49:28 PM
Although I have had a reply by last.fm, I dont believe anything has been changed for now. They have restricted MusicBee (total requests for for all users averaged per second) to a very low API request rate ie. its not something you or I can control. So expect this issue to keep happening while discussion is still ongoing.
I dont think this is anything specifically about MusicBee and has been done to all apps that use more than just the scrobble api's
Title: Re: LastFM changes to API (02/05/19)
Post by: Bizy on May 07, 2019, 07:31:00 PM
Before using my Last.fm account, I used 'loves' on top of ratings - for temporary 'flashes' and quickly finding them.
No problem, ever ever.

Paradoxically:  since I read the responses on the poll on Last.fm, I started using my account and yes, well, kind of liked it (especially for the recommendations, as Bobisimo mentioned).

Now I have these annoying pop-ups (as reported in this thread)  &gt;:(
And even when I disable scroblling, I can't use '(un)love' anymore - always these popups...  &gt;:(

Installing that latest patch didn't remedy that.

b.
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 07, 2019, 07:48:47 PM
I think they should use user-level rate limit for scrobbling and loving tracks, not app-level limit.
If they won't listen, one way is to remove the built-in functionality from MB and have users install last.fm's scrobbler app. I think that's how iTunes and WMP support last.fm scrobbling. Then each user will have a daily limit per IP.
Title: Re: LastFM changes to API (02/05/19)
Post by: frankz on May 07, 2019, 08:10:52 PM
Has anyone reported any problem other than in the loving of tracks?  Scrobbling is working fine.  I haven't seen anyone reporting anything other than an issue with loving tracks. If the only thing that's an actual problem seems to be in the loving of tracks, if it comes to it, the only thing that should really need to change is to disable the loving of tracks. 


But I don't think it's going to come to that.  I can't see last.fm being intransigent with an overall provider of a data they make money off of.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 07, 2019, 08:18:54 PM
its everything except scrobbling
Title: Re: LastFM changes to API (02/05/19)
Post by: frankz on May 07, 2019, 08:28:42 PM
Well I hope I'm right that they will act sensibly in the end then. You've built a lot of cool stuff into MB around last.fm (most of which I'm unfortunately just fully exploring now at this late date since it became an issue).
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 07, 2019, 10:09:41 PM
Do they assume loving should be done while actually listening to the track just like scrobbling?
Title: Re: LastFM changes to API (02/05/19)
Post by: Bee-liever on May 08, 2019, 12:35:08 AM
Has anyone reported any problem other than in the loving of tracks?
its everything except scrobbling

Could it also be the way MB submits the loved tracks?
I've noticed that MB includes all version of a track that has the same title/artist, not taking into account the album it's from.
If I 'love' the Eurythmics-Sweet Dreams (from Sweet Dreams album) MB also 'loves' the live and remix versions I have from different albums.

If you have a few duplicates of a track in your library, this could be the trigger for:
(https://i.imgur.com/KvXdtMa.png)
Title: Re: LastFM changes to API (02/05/19)
Post by: Bizy on May 08, 2019, 12:51:27 AM
@Bee-liever:  I doubt that.  I got the same message for tracks that I assume to be unique.  (And, I'll keep this in mind whenever I got that message and will search for 'duplicates' of that song.)
Title: Re: LastFM changes to API (02/05/19)
Post by: Skywake on May 08, 2019, 02:55:50 PM
Really sucks. Basically the main reason I use Musicbee is reverse scrobbling. I listen to and scrobble music on my phone,  reverse scrobble to MB and then sync back auto playlists to my phone. Without that? Last.fm is just stats and Musicbee is a glorified windows explorer.
Title: Re: LastFM changes to API (02/05/19)
Post by: frankz on May 08, 2019, 03:08:27 PM
I listen to and scrobble music on my phone,  reverse scrobble to MB and then sync back auto playlists to my phone.
I do this every day.  It works the same today as it did May 2.
Without that? Last.fm is just stats and Musicbee is a glorified windows explorer.
Welcome to the forum. :-\
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 08, 2019, 06:25:00 PM
So last.fm are not going to budge on this, and not even grant a temporary reprive before changes could me made and rolled out. Even if I make changes and go live in the next few days there will be many months before it takes effect as users adopt the new version ie. this rate limit issue is going to remain for a long time. I did explain this but the person I am dealing with either doesnt understand the point or just doesnt care about the apps or the last.fm users affected. I have to say I am staggered they can't see they are also hurting themselves but thats what we have.

I am in two minds what to do. If I make changes, it wont be effective for a long time so almost pointless spending the time doing so in the short to medium term (other than the artwork retrieval which has to be removed). Realistically the only things that can remain are track love; similar artists; and play count sync. Even then by my calculations MusicBee may still be over the limit so play count and love sync will be manual only. Given that scrobbling is not affected at all, I will leave that in.

I guess another approach is someone builds a plugin for play count and love sync, so if anyone wants to step up to the plate with that let me know.
Title: Re: LastFM changes to API (02/05/19)
Post by: frankz on May 08, 2019, 07:05:45 PM
I wish I had the skill to do the plugin(s).   I really do. 

I'll tell you what I think for what it's worth.  One man's opinion. 

Play count and scrobbling are essential functions that are integral to music listening across devices / platforms. I use these heavily, so my opinion is appropriately biased in that respect.

Track love is nice and nearly essential, but can be accomplished internally for every other purpose except interacting with the last.fm service, and screw them.  What I mean by "accomplished internally" is that you could, if you wanted to, build a track love function into MusicBee tomorrow.  Or people could utilize the rating function. Or people could just add tracks they really like to a playlist for such tracks.  Loving tracks is a really "last.fm" specific thing.  I don't use "love," so my opinion is again biased.  It seem fairly redundant to me.

I've recently gotten really into the "similar artists" thing, but it is non-essential.  You could even replace it with a function from another API like the Spotify Public API (https://rapidapi.com/dimas/api/SpotifyPublicAPI) if you really wanted to.  If it were to go away, it would not be devastating.

Again, just one guy's input.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 08, 2019, 07:28:10 PM
screw them.
yes I do find that statement very appealing at the moment and thats what I really meant when I said I was in two minds.
Thanks for the spotify link - i had forgotten about that and I will discuss that with the author of the spotify plugin
As to track love, I had the same thoughts and if I do go down the path of "screw them" I was thinking if last.fm is just being used for playcount stats then I would remove last.fm scrobbling all-together and make it available for libre-fm.
Anyway, when I will leave this a few days before deciding definitely what I will do and see what others have to say.

edit:
Also there is already an API for album artwork retreival. There are other sites that could be accessed via a plugin.
If someone is willing to work on an artist picture retrieval plugin, i can add an API for that
Title: Re: LastFM changes to API (02/05/19)
Post by: frankz on May 08, 2019, 08:02:17 PM
I'd have no problem using libre.fm over last.fm FWIW.  I like their rec's, but to hell with them if they are going to be this way.

Listenbrainz is another option.  People can even import their last.fm info to that automatically.
Title: Re: LastFM changes to API (02/05/19)
Post by: hiccup on May 08, 2019, 08:41:28 PM
Listenbrainz is another option.

That might be a very good idea.

Them being a part of MetaBrainz is a very big advantage and could also open up many other new possibilities for MusicBee.
Imagine the data they have available from their MusicBrainz, ListenBrainz, AcousticBrainz and CritiqueBrainz projects.

Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 08, 2019, 10:35:10 PM
Even if I make changes and go live in the next few days there will be many months before it takes effect as users adopt the new version ie. this rate limit issue is going to remain for a long time.

When the official release of a new version (whatever changes are made into that) is ready, can't you just change the API key that would make the current key expire after a while? That would force users to look for an update to resolve their ongoing last.fm issue. But it will be up to how you're gonna deal with this whether such a measure is necessary or not.
Title: Re: LastFM changes to API (02/05/19)
Post by: Mr. Trev on May 09, 2019, 05:13:36 AM
I'll toss in my random unsolicited opinion…

My biggest use for the LastFM api is the similar artists function in AutoDJ. I'm not sure how much this will be affected, but I imagine that eventually it will be. Even though I really like having that feature, my vote goes into the "screw them" box. Seems like options such as LibreFM, Listenbrainz, or the Spotify plugin could just as easily fill in the gap - and only get better as (hopefully) more people jump ship from LastFM.

just my 5¢…
Cheers
Title: Re: LastFM changes to API (02/05/19)
Post by: frankz on May 09, 2019, 05:55:27 AM
I've seen libre.fm mentioned a lot of places over the last few years. I don't know if anyone here has actually used libre.fm, but I signed up for an account 8 hours ago that I have no way to access because I never got an authentication email. Nothing in my email account, nothing in my spam.  No way to resend the email on the page.  All the tools I've found for importing from last.fm are years old and don't appear to have been updated in a long while. I found this guide (https://www.reddit.com/r/foobar2000/comments/3zaiy6/guide_to_librefm_scrobbling_lastfm_backup_to/) on reddit from 3 years ago on how to do it.  No idea if that still works.  I could have tried it if I'd been able to access the account I created. 

As far as Listenbrainz, I've had an account with that for a while.  I regularly import my last.fm scrobbles there.  You click a button and they're there: dead simple.  Besides accepting scrobbles (which they call "listens," because apparently scrobbles is a trademark) and feeding them back via their API (https://listenbrainz.readthedocs.io/en/production/dev/api.html#reference), it doesn't do much, but I'm not sure it needs to for our purposes.  Listenbrainz is by Musicbrainz, which is a foundation with some backing $$ behind it.
Title: Re: LastFM changes to API (02/05/19)
Post by: Skywake on May 09, 2019, 11:00:43 AM
I listen to and scrobble music on my phone,  reverse scrobble to MB and then sync back auto playlists to my phone.
I do this every day.  It works the same today as it did May 2.
I wouldn't have made an account on this forum and posted if it was working fine for me. All I know is that it has worked almost without fail for the probably 4 maybe 5 years I've been using MusicBee and then the last week it's been a bit temperamental. I usually "refresh" my phone once a week. The reverse scrobble wasn't working for me last friday, then again on monday, tuesday it worked and I assumed it was just a last.fm outage or something. But wednesday out of curiosity I checked again and nada. So I look into it and find the last.fm post and this thread here, post my ire. Curiously it's working for me today again.


Without that? Last.fm is just stats and Musicbee is a glorified windows explorer.
Welcome to the forum. :-\
Yeah I know I came off as a bit brutal but TBH that's kinda how it is. I haven't really listened to music via a desktop client for years, I use my phone on the go and Sonos when at home. MusicBee for me is just a way to generate "rotation" playlists like I used to make for WinAmp, Windows Media Player and Amarok for a bit for the way I listen to music now. Without the full two-way sync with last.fm it doesn't do that for me. This feature is why I started using MusicBee in the first place.

So when I see that one thing being broken? I make a post on a forum where people who may be able to push back on it will see. ;)
Title: Re: LastFM changes to API (02/05/19)
Post by: frankz on May 09, 2019, 12:37:42 PM
Without that? Last.fm is just stats and Musicbee is a glorified windows explorer.

I wouldn't have made an account on this forum and posted if it was working fine for me. All I know is that it has worked almost without fail for the probably 4 maybe 5 years I've been using MusicBee and then the last week it's been a bit temperamental. I usually "refresh" my phone once a week. The reverse scrobble wasn't working for me last friday, then again on monday, tuesday it worked and I assumed it was just a last.fm outage or something. But wednesday out of curiosity I checked again and nada. So I look into it and find the last.fm post and this thread here, post my ire. Curiously it's working for me today again.


Yeah I know I came off as a bit brutal but TBH that's kinda how it is. I haven't really listened to music via a desktop client for years, I use my phone on the go and Sonos when at home. MusicBee for me is just a way to generate "rotation" playlists like I used to make for WinAmp, Windows Media Player and Amarok for a bit for the way I listen to music now. Without the full two-way sync with last.fm it doesn't do that for me. This feature is why I started using MusicBee in the first place.

So when I see that one thing being broken? I make a post on a forum where people who may be able to push back on it will see. ;)
Sorry you had to try more than once to sync your mobile song plays to a program you didn't pay for.  That must have been hard for you.  You OK?


Maybe the proper reaction when you're "irate" over something like this isn't to insult the hard work of someone who let you enjoy the benefits of that hard work for 5 years for free on a site he owns?
Title: Re: LastFM changes to API (02/05/19)
Post by: ost on May 09, 2019, 12:41:21 PM
As for me I rather will stop using last.fm than MusicBee.
Title: Re: LastFM changes to API (02/05/19)
Post by: stardepp on May 09, 2019, 12:47:50 PM
So with me all Last.FM functions work:

(https://i.imgur.com/TXzADCY.jpg)

(https://i.imgur.com/zGDkBbg.jpg)
Title: Re: LastFM changes to API (02/05/19)
Post by: frankz on May 09, 2019, 12:55:18 PM
Last.fm has imposed limits on how many times any app, including MB, can communicate with its server for everything but scrobbling (including initial login), and they are not being reasonable in addressing how that affects their users.  

These functions are going to work and not work at different times until Steven removes some or all of the functionality and they completely stop working. Plan accordingly.

Posts about the functions and features of alternative services would be helpful.
Title: Re: LastFM changes to API (02/05/19)
Post by: Bee-liever on May 09, 2019, 02:17:20 PM
So with me all Last.FM functions work
Not quite all  :(
That 'star-within-a-square' image in your now playing bar is were last.FM has stopped providing artist images.

I have not had any of the error message windows myself, but my times of use are probably not in peak usage hours.
For me ListenBrainz, even if only in beta, is looking a very attractive alternative.

If CBS can slip this change into the terms of service:
Quote from: https://www.last.fm/api/tos
Rate Limit: Last.fm sets and enforces limits on use of the API to prevent abuse and ensure reliability of service (e.g. limiting the number of API requests that you may make or the number of users you may serve), in our sole discretion. You agree to, and will not attempt to circumvent, such limitations. If you would like to use the API beyond these limits, you must obtain Last.fm’s express consent (and Last.fm may decline such request or condition acceptance on your agreement to additional terms and/or charges for that use).

How long will it be before they start enforcing these little gems:
Quote
You must credit Last.fm and include links to the Last.fm site when You use the Last.fm Data.

Quote
You must not transmit, export, transfer, divert, or send any Last.fm Data to any country without obtaining any consents or authorisations required by law or regulation in such country.

Quote
Although You are granted this licence without charge, Last.fm reserves the right to share in revenue generated from your use of Last.fm Data in future on terms to be negotiated in good faith between Last.fm and You.
Title: Re: LastFM changes to API (02/05/19)
Post by: zkhcohen on May 09, 2019, 03:24:22 PM
screw them.
yes I do find that statement very appealing at the moment and thats what I really meant when I said I was in two minds.
Thanks for the spotify link - i had forgotten about that and I will discuss that with the author of the spotify plugin
As to track love, I had the same thoughts and if I do go down the path of "screw them" I was thinking if last.fm is just being used for playcount stats then I would remove last.fm scrobbling all-together and make it available for libre-fm.
Anyway, when I will leave this a few days before deciding definitely what I will do and see what others have to say.

edit:
Also there is already an API for album artwork retreival. There are other sites that could be accessed via a plugin.
If someone is willing to work on an artist picture retrieval plugin, i can add an API for that

Let me know exactly what needs to be done and I can probably do it.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 09, 2019, 06:07:12 PM
When the official release of a new version (whatever changes are made into that) is ready, can't you just change the API key that would make the current key expire after a while? That would force users to look for an update to resolve their ongoing last.fm issue.
thanks for the suggestion and i have proposed that to last.fm but haven't heard back as yet
Title: Re: LastFM changes to API (02/05/19)
Post by: rudolph on May 09, 2019, 06:08:44 PM
I wouldn't call this a bug. LastFM changed the terms of use for their API and you have exceeded the new limits. I doubt there's anything Steven can do legally to get around the new limits and I wouldn't expect him to try to circumvent the new terms of use.

Isn't there an option to implement individual api key system like with discogs tagging? Everyone who uses lastfm feature should just enter his own last.fm api key into musicbee.


Took me 20 seconds to get api key..

https://www.last.fm/api/account/create
Title: Re: LastFM changes to API (02/05/19)
Post by: zkhcohen on May 09, 2019, 06:51:01 PM
I wouldn't call this a bug. LastFM changed the terms of use for their API and you have exceeded the new limits. I doubt there's anything Steven can do legally to get around the new limits and I wouldn't expect him to try to circumvent the new terms of use.

Isn't there an option to implement individual api key system like with discogs tagging? Everyone who uses lastfm feature should just enter his own last.fm api key into musicbee.


Took me 20 seconds to get api key..

https://www.last.fm/api/account/create

Now that's a good idea.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 09, 2019, 08:21:05 PM
i dont agree at all - i believe that will be circumventing what last.fm are intending and would only result in MusicBee being banned
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 09, 2019, 10:17:16 PM
Let me know exactly what needs to be done and I can probably do it.
thanks for the offer to help. In the end i have decided to integrate similar artist searching via the spotify api directly into musicbee and have a rough version working.
Title: Re: LastFM changes to API (02/05/19)
Post by: zkhcohen on May 09, 2019, 10:19:25 PM
Let me know exactly what needs to be done and I can probably do it.
thanks for the offer to help. In the end i have decided to integrate similar artist searching via the spotify api directly into musicbee and have a rough version working.

Awesome! Glad to hear that it's working.

The Spotify API can be a pain.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 10, 2019, 06:05:31 PM
This is where things are at and what I am planning to do:
- Currently MusicBee exceeds app level rate limits by 10x ie. the requests would need to be reduced to 10% of current usage. Scrobbling is not affected for existing users, but new users cant reliably make the first connection to log on.
- I have identified track love, play count sync, similar artists and artist biographies as key functions that could be kept without exceeding the limits.
- However even when the new MusicBee version is released it will take many months before the reduced usage takes effect because older MB versions will still be in use. So last.fm usage will be unreliable for a long time without some other action.
- I have proposed to last.fm that MusicBee be allowed to use a new API key and the existing key revoked after a period of time, so allowing users of the new MB version to reliably use last.fm and eventually forcing all MB users to the new version.
- last.fm have not responded to this proposal and for now my working assumption is they will either ignore or decline it. I am not planning to get a new API key without their approval.
- So on the working assumption that last.fm will be unreliable for a long time, I have started looking at alternatives to last.fm:
  - Already done is artist bio retrieval from Wikipedia
  - For similar artists a rough working version using Spotify has been done. The downside is you will need a Spotify account to make use of it
  - For playcounts and scrobbling, forum members have suggested listenbrainz. I haven't looked at this yet but it sounds promising. The downside is users would need to export their last.fm playcounts to listenbrainz.
  - For other functions like artist picture retrieval my offer is to provide an API if someone is willing to write a plugin
Title: Re: LastFM changes to API (02/05/19)
Post by: zkhcohen on May 10, 2019, 06:36:28 PM
  - 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.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 10, 2019, 09:54:14 PM
does anyone has a good icon to replace the current scrobbling icon?
Title: Re: LastFM changes to API (02/05/19)
Post by: stardepp on May 10, 2019, 09:59:15 PM
Maybe this?

(https://i.imgur.com/jviW8ft.png)
Title: Re: LastFM changes to API (02/05/19)
Post by: Bee-liever on May 11, 2019, 07:14:34 AM
does anyone has a good icon to replace the current scrobbling icon?

(https://i.imgur.com/HrMwacl.png)
also in vector (SVG)
Title: Re: LastFM changes to API (02/05/19)
Post by: eddiestrike on May 11, 2019, 02:52:59 PM
I am really disheartened over this whole thing. I made my last.fm account just because of MusicBee and how it integrated with it. They gained a customer because of MusicBee and now they're throwing us under the bus.

My playcounts and loved tracks are essential to my music listening experience. Really hope this gets resolved.  :'(
Title: Re: LastFM changes to API (02/05/19)
Post by: Mauser69 on May 11, 2019, 04:30:31 PM
I made my last.fm account just because of MusicBee and how it integrated with it. They gained a customer because of MusicBee and now they're throwing us under the bus.
Steven, I am sorry the boneheads at lastfm are making life miserable for you.  I do think you are taking the right attitude about this, and I really thank you for all the hard work you put into this app!

I am not a big lastfm user, but I did create an account there only because of the integration with MusicBee, so I am another customer they got specifically from you.  Although I have been slowly using lastfm more as time went on, after this fiasco, I now have absolutely NO interest in them at all.  I freely agree with the "SCREW THEM" approach.

Whatever changes you make to use other services and options will be the right ones.  I will absolutely continue to use MusicBee and NOT use lastfm.
Title: Re: LastFM changes to API (02/05/19)
Post by: KatyLB on May 11, 2019, 04:55:33 PM
Retracted
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 11, 2019, 05:11:00 PM
Hi KatyLB - i have sent you a PM with the details
Title: Re: LastFM changes to API (02/05/19)
Post by: stardepp on May 11, 2019, 05:11:27 PM
Quote
Hallo, dies ist eine der Last.fm Moderatoren hier.

Ich kam in der oben auf Reddit, und ich bin sicher , dass dies (der fett gedruckten Teil) keine beabsichtigte Wirkung des API Limits ist und ich werde es als ein Problem mit dem Team erhöhen.

Ich bin auch nicht klar, ob diese ganze Frage bestimmt ist, weil die Rate Limiting, wie ich es verstehe, sollte durch eine Begrenzung der Anzahl der scrobbles (und nur scrobbles) Missbrauch von scrobbling verhindern, dass Benutzer an einem Tag machen können. Mein Verständnis ist, dass dies die Menschen daran zu hindern, die Website missbräuchlich von Zehntausenden von scrobbles pro Tag zu machen, und die Grenzen gesetzt sind über das, was jeder Benutzer treffen könnte, wenn sie ihre Streams legitim sind Scrobbeln. Also, es gibt absolut keine Möglichkeit, Ihre Probleme mit der Anwendung einfach Scrobbeln mit werden sollten, wenn Sie scrobbling korrekt per API und andere Anwendungen (wie foobar2000, die ich verwenden) implementiert haben, werden keine solchen Probleme mit, so dass ich bin mir nicht sicher warum die Leute können nicht einmal eine Verbindung scrobble.


What this means in simple terms? How can we MusicBee users all of the load.FM Scrobble function fully? We do not need the Scrobble service miss.
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 12, 2019, 04:49:07 AM
- Currently MusicBee exceeds app level rate limits by 10x ie. the requests would need to be reduced to 10% of current usage. Scrobbling is not affected for existing users, but new users cant reliably make the first connection to log on.
- I have identified track love, play count sync, similar artists and artist biographies as key functions that could be kept without exceeding the limits.

Does that mean about 90% of the current usage of their API from MB users is for downloading artist pictures & album covers?
Title: Re: LastFM changes to API (02/05/19)
Post by: eddiestrike on May 12, 2019, 08:12:55 AM
I would gladly pay for a lastfm+ account if it meant allowing us to have old API relationship back. No idea if this would be possible on their end though.  :o
Title: Re: LastFM changes to API (02/05/19)
Post by: decon on May 12, 2019, 10:59:41 AM
Aw this sucks. Too bad last.fm are so hard to deal with.

Might my issues relating to syncing loved tracks to auto playlists in MB?

My auto playlist with Love == Loved contains 389 tracks. However, the last.fm playlist generator contains 415 tracks. I have 469 loved tracks on last.fm (I don't know if this is because MB only syncs loved tracks that I have in my library).
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 12, 2019, 04:03:10 PM
Does that mean about 90% of the current usage of their API from MB users is for downloading artist pictures & album covers?
by far the largest is artist image retrieval and album covers

Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 12, 2019, 04:13:03 PM
https://getmusicbee.com/patches/MusicBee33_Patched.zip

this version has the following:
- uses a new API key so you should be reliably able to use the last.fm functions that MB still supports
- as such, if you use a last.fm account you will be prompted to confirm access for MusicBee (once only)
- the functions implemented are:
  - scrobbling
  - playcount sync
  - track love and track love sync - however track love now only updates last.fm if the "synchronise Track Love to last.fm is enabled in the last.fm plugin preferences ie. without that being set, track love now only updates the musicbee database
  - artist biographies
  - similar artists
- as a fallback, spotify is also used for similar artists if none are found on last.fm or last.fm is failing
- as a fallback wikipedia is used if last.fm artist biography fails - however wikipedia is not ideal as its not specifically focused on music/  artists and i am expecting there will be some cases of rubbish results
- for artist thumbnails, fanart.tv is still used but as a fallback, spotify is used
Title: Re: LastFM changes to API (02/05/19)
Post by: ost on May 12, 2019, 04:31:47 PM
last.fm is blocked by some Russian ISP's and now I can't use this plugin after update

(https://i.imgur.com/l1ktAYq.png)
Title: Re: LastFM changes to API (02/05/19)
Post by: stardepp on May 12, 2019, 04:53:45 PM
Last.fm Statistics will stop working and the current play bar will no longer show the played counter after the artist.

(https://i.imgur.com/FiaDC1l.jpg)
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 12, 2019, 05:14:07 PM
Last.fm Statistics will stop working and the current play bar will no longer show the played counter after the artist.
that plugin is still using the unreliable API key and until i update it, it will only work sometimes. The play counter is no longer supported
Title: Re: LastFM changes to API (02/05/19)
Post by: stardepp on May 12, 2019, 05:17:20 PM
Last.fm Statistics will reappear, after which I have reinstalled the addon Last.fm Statistics.

But the current play bar still does not show the played counter behind the artist. Is it wanted like that?
I mean this ad, see screenshot:


(https://i.imgur.com/Izp49QJ.jpg)
Title: Re: LastFM changes to API (02/05/19)
Post by: stardepp on May 12, 2019, 05:18:46 PM
OK good to know.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 12, 2019, 05:30:22 PM
the last.fm plugins with the new api key:
https://www.mediafire.com/file/3td2dmt2hd6vdk1/mb_LastFmStatsPlugin.zip/file
https://www.mediafire.com/file/m8387radlr0fkv9/mb_LastFmRecommendationsPlugin.zip/file
https://www.mediafire.com/file/6kk9q7uj16dqzsn/mb_LastFmPlaylistPlugin.zip/file
Title: Re: LastFM changes to API (02/05/19)
Post by: stardepp on May 12, 2019, 05:36:57 PM
Many thanks for your effort.
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 12, 2019, 06:45:24 PM
- as a fallback wikipedia is used if last.fm artist biography fails - however wikipedia is not ideal as its not specifically focused on music/  artists and i am expecting there will be some cases of rubbish results

Thanks for adding this! Very useful for classical music artists.

- It returns just a double quote without any content for some artists: e.g. Erica Morini
- If the previous paragraph ends with a hyperlink, it doesn't format properly. A lot of artists end with ".References" because of that. e.g. Aleksandr Gauk
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 12, 2019, 06:49:10 PM
- for artist thumbnails, fanart.tv is still used but as a fallback, spotify is used

Is audioDB no longer supported either for artist picture downloader or artist backdrop? It seems artist gallery retrieves only from fanart.tv.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 12, 2019, 07:03:29 PM
- It returns just a double quote without any content for some artists: e.g. Erica Morini
- If the previous paragraph ends with a hyperlink, it doesn't format properly. A lot of artists end with ".References" because of that. e.g. Aleksandr Gauk
both are addressed now, but for Erica Morini wikipedia is returning no data for some reason

Is audioDB no longer supported either for artist picture downloader or artist backdrop? It seems artist gallery retrieves only from fanart.tv.
they blocked musicbee a long time ago due to high volume.
It will really need someone to write a plugin that can get artist backdrops from google or the like

edit:
i think i will also do something with wikipedia for getting the main artist backdrop
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 12, 2019, 07:12:49 PM
both are addressed now, but for Erica Morini wikipedia is returning no data for some reason

Thanks! Working fine now. Actually it was wrong tag for Erika Morini.
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 12, 2019, 07:16:07 PM
Let me know exactly what needs to be done and I can probably do it.

Would be great if you can build a plugin for retrieving artist backdrops. Right now it retrieves only from fanart.tv except local pictures.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 12, 2019, 07:46:08 PM
I have added the main picture from the artist wikipedia page for the backdrops.
I will see if it will be feasible to get other pictures with the artist name in the picture but not promising as it might be too unreliable/ slow
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 12, 2019, 08:42:52 PM
Thanks! It works for some but not for many others, maybe because the picture is too small or with portrait orientation. Above all, many artists have no pictures in their wikipedia entry.

For backdrops of obscure artists, Google would work much better.

Code
https://www.google.com/search?tbm=isch&tbs=imgo:1,iar:w,isz:l&q=<Artist>
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 12, 2019, 08:48:17 PM
Thanks! It works for some but not for many others, maybe because the picture is too small or with portrait orientation. Above all, many artists have no pictures in their wikipedia entry.
can you provide a couple of examples where its too small - i should be able to solve that
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 12, 2019, 08:49:43 PM
Igor Markevitch
Isaac Stern
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 12, 2019, 09:02:50 PM
How about Spotify and iTunes Store? Do they support backdrops?
Title: Re: LastFM changes to API (02/05/19)
Post by: ost on May 12, 2019, 09:11:14 PM
Is it possible to made the pop-up window when connecting to last.fm at the first time be opened at an external browser? (Mozilla/Chrome/etc.) Last.fm site working in Russia with some ISP's only via VPN plugins at browsers  :(
When it opens as a pop-up window inside MB I get an error and proxy settings in Preferences is not working at all.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 12, 2019, 10:04:46 PM
Igor Markevitch
Isaac Stern
This version now applies the same minimum size requirements as it did with last.fm, and now also gets all suitable images from the artist's page

https://getmusicbee.com/patches/MusicBee33_Patched.zip
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 12, 2019, 10:11:48 PM
last.fm is blocked by some Russian ISP's and now I can't use this plugin after update
try this version - you only need to connect once to last.fm and then you can use the normal versions of MB again after that:

https://www.mediafire.com/file/5kcmce7vnvbmltj/MusicBeeLastFm.zip/file
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 12, 2019, 10:24:32 PM
It doesn't retrieve pictures for the two artists. I'm monitoring backdrops cache folder when it tries to retrieve and it just creates 0 byte tmp files for them.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 12, 2019, 10:29:44 PM
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
Title: Re: LastFM changes to API (02/05/19)
Post by: ost on May 12, 2019, 10:33:30 PM
try this version...

Thank you!
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 12, 2019, 10:44:40 PM
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?
Title: Re: LastFM changes to API (02/05/19)
Post by: frankz on May 12, 2019, 11:23:03 PM
I don't know if you're still looking for / open to additional sources, but I've been looking at the Deezer API (https://developers.deezer.com/api/explorer) (which is billed on its homepage as "Unlimited Access, without stress, without identification") and here's the type of information you get from an artist search:

Code
  "data": [
    {
      "id": "9635624",
      "name": "Billie Eilish",
      "link": "https://www.deezer.com/artist/9635624",
      "picture": "https://api.deezer.com/artist/9635624/image",
      "picture_small": "https://e-cdns-images.dzcdn.net/images/artist/92b64dd0991caf4c03e4a2ac2283d9ed/56x56-000000-80-0-0.jpg",
      "picture_medium": "https://e-cdns-images.dzcdn.net/images/artist/92b64dd0991caf4c03e4a2ac2283d9ed/250x250-000000-80-0-0.jpg",
      "picture_big": "https://e-cdns-images.dzcdn.net/images/artist/92b64dd0991caf4c03e4a2ac2283d9ed/500x500-000000-80-0-0.jpg",
      "picture_xl": "https://e-cdns-images.dzcdn.net/images/artist/92b64dd0991caf4c03e4a2ac2283d9ed/1000x1000-000000-80-0-0.jpg",
      "nb_album": 19,
      "nb_fan": 272375,
      "radio": true,
      "tracklist": "https://api.deezer.com/artist/9635624/top?limit=50",
      "type": "artist"
    },
    {
      "id": "9718618",
      "name": "Billie Eilish & Goldhouse",
      "link": "https://www.deezer.com/artist/9718618",
      "picture": "https://api.deezer.com/artist/9718618/image",
      "picture_small": "https://e-cdns-images.dzcdn.net/images/artist//56x56-000000-80-0-0.jpg",
      "picture_medium": "https://e-cdns-images.dzcdn.net/images/artist//250x250-000000-80-0-0.jpg",
      "picture_big": "https://e-cdns-images.dzcdn.net/images/artist//500x500-000000-80-0-0.jpg",
      "picture_xl": "https://e-cdns-images.dzcdn.net/images/artist//1000x1000-000000-80-0-0.jpg",
      "nb_album": 0,
      "nb_fan": 24,
      "radio": false,
      "tracklist": "https://api.deezer.com/artist/9718618/top?limit=50",
      "type": "artist"
    },
    {
      "id": "9644252",
      "name": "Billie Eilish & Blackbear",
      "link": "https://www.deezer.com/artist/9644252",
      "picture": "https://api.deezer.com/artist/9644252/image",
      "picture_small": "https://e-cdns-images.dzcdn.net/images/artist//56x56-000000-80-0-0.jpg",
      "picture_medium": "https://e-cdns-images.dzcdn.net/images/artist//250x250-000000-80-0-0.jpg",
      "picture_big": "https://e-cdns-images.dzcdn.net/images/artist//500x500-000000-80-0-0.jpg",
      "picture_xl": "https://e-cdns-images.dzcdn.net/images/artist//1000x1000-000000-80-0-0.jpg",
      "nb_album": 0,
      "nb_fan": 165,
      "radio": false,
      "tracklist": "https://api.deezer.com/artist/9644252/top?limit=50",
      "type": "artist"
    },
    {
      "id": "9644254",
      "name": "Billie Eilish & Astronomyy",
      "link": "https://www.deezer.com/artist/9644254",
      "picture": "https://api.deezer.com/artist/9644254/image",
      "picture_small": "https://e-cdns-images.dzcdn.net/images/artist//56x56-000000-80-0-0.jpg",
      "picture_medium": "https://e-cdns-images.dzcdn.net/images/artist//250x250-000000-80-0-0.jpg",
      "picture_big": "https://e-cdns-images.dzcdn.net/images/artist//500x500-000000-80-0-0.jpg",
      "picture_xl": "https://e-cdns-images.dzcdn.net/images/artist//1000x1000-000000-80-0-0.jpg",
      "nb_album": 0,
      "nb_fan": 109,
      "radio": false,
      "tracklist": "https://api.deezer.com/artist/9644254/top?limit=50",
      "type": "artist"
    }
  ],
  "total": 4
}

Once you get the artist ID you can do things like "Related" (truncated for space)
Code
{
  "data": [
    {
      "id": "5518450",
      "name": "Melanie Martinez",
      "link": "https://www.deezer.com/artist/5518450",
      "picture": "https://api.deezer.com/artist/5518450/image",
      "picture_small": "https://e-cdns-images.dzcdn.net/images/artist/cb72b850fd6a761bcdd2609c5eae8e3a/56x56-000000-80-0-0.jpg",
      "picture_medium": "https://e-cdns-images.dzcdn.net/images/artist/cb72b850fd6a761bcdd2609c5eae8e3a/250x250-000000-80-0-0.jpg",
      "picture_big": "https://e-cdns-images.dzcdn.net/images/artist/cb72b850fd6a761bcdd2609c5eae8e3a/500x500-000000-80-0-0.jpg",
      "picture_xl": "https://e-cdns-images.dzcdn.net/images/artist/cb72b850fd6a761bcdd2609c5eae8e3a/1000x1000-000000-80-0-0.jpg",
      "nb_album": 26,
      "nb_fan": 294696,
      "radio": true,
      "tracklist": "https://api.deezer.com/artist/5518450/top?limit=50",
      "type": "artist"
    },
    {
      "id": "50633812",
      "name": "Conan Gray",
      "link": "https://www.deezer.com/artist/50633812",
      "picture": "https://api.deezer.com/artist/50633812/image",
      "picture_small": "https://e-cdns-images.dzcdn.net/images/artist/7907c9fd375e417e5ba35cb85c80b7a1/56x56-000000-80-0-0.jpg",
      "picture_medium": "https://e-cdns-images.dzcdn.net/images/artist/7907c9fd375e417e5ba35cb85c80b7a1/250x250-000000-80-0-0.jpg",
      "picture_big": "https://e-cdns-images.dzcdn.net/images/artist/7907c9fd375e417e5ba35cb85c80b7a1/500x500-000000-80-0-0.jpg",
      "picture_xl": "https://e-cdns-images.dzcdn.net/images/artist/7907c9fd375e417e5ba35cb85c80b7a1/1000x1000-000000-80-0-0.jpg",
      "nb_album": 4,
      "nb_fan": 2945,
      "radio": true,
      "tracklist": "https://api.deezer.com/artist/50633812/top?limit=50",
      "type": "artist"
    },
}
Title: Re: LastFM changes to API (02/05/19)
Post by: jspaceman009 on May 13, 2019, 12:53:15 AM
Greatly appreciate all the recent work on getting MB functioning during the last.fm crisis. I'm neither a programmer or contributor, just a consumer. One of the key elements I used MB/Last.fm for was to generate GENRE tags.

It was a super smooth process and very consistent. I've noticed this is one of the aspects that is still not normal since the last.fm problems, in fact the recent pluggin has removed it all together. The options remaining cannot retrieve genres. I've attempted to use Musicbrainz Picard which has a plugin for wikidata genre retrieval. It kinda works, no where near as robust as MB was with the last.fm option. Also Picard is a tricky software, unless properly configured it can easily wipe all your ID3 tags with the click of the mouse.

Steven, I know you're putting in some hard work and you've got an excellent piece of software. Is there a way to resolve the genre search/tag functionality? I'm guessing there are sources to retrieve this metadata. I wouldn't know how to do it, but the feature is essential to my library and nearly all auto-dj sessions are built from genre.

Could I be missing something? Thanks for any assistance. Great work as always. Thanks.
Title: Re: LastFM changes to API (02/05/19)
Post by: stardepp on May 13, 2019, 04:56:34 AM
It's a shame that this played counter has been removed in the current playlist in MusicBee version 3.3.7071. I would be very happy if this played counter is displayed again in the next version of MusicBee, because I find this feature very useful.

(https://i.imgur.com/USwxmJP.jpg)

(https://i.imgur.com/uJ9ZJPJ.jpg)
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 13, 2019, 06:49:28 AM
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
Title: Re: LastFM changes to API (02/05/19)
Post by: stardepp on May 13, 2019, 06:52:11 AM
Ok I understand. Nevertheless, it remains my favorite program to listen to music.
Title: Re: LastFM changes to API (02/05/19)
Post by: jspaceman009 on May 13, 2019, 10:20:45 AM
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.
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 13, 2019, 12:27:40 PM
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.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 13, 2019, 07:58:21 PM
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
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 13, 2019, 08:27:51 PM
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.
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 13, 2019, 09:26:57 PM
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.
Title: Re: LastFM changes to API (02/05/19)
Post by: zkhcohen on May 13, 2019, 09:42:54 PM
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.

Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 13, 2019, 10:01:39 PM
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
Title: Re: LastFM changes to API (02/05/19)
Post by: Mr. Trev on May 13, 2019, 10:51:16 PM
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?
Title: Re: LastFM changes to API (02/05/19)
Post by: zkhcohen on May 13, 2019, 10:59:27 PM
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.
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 14, 2019, 12:29:31 AM
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.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 14, 2019, 05:53:33 PM
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
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 14, 2019, 06:00:29 PM
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)
Title: Re: LastFM changes to API (02/05/19)
Post by: zkhcohen on May 14, 2019, 06:17:57 PM
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.
Title: Re: LastFM changes to API (02/05/19)
Post by: magpy on May 15, 2019, 10:45:53 PM
Play Similar and Auto DJ still aren't working for me with the latest patch. I just get tracks by the original artist.
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 16, 2019, 02:27:53 AM
Play Similar and Auto DJ still aren't working for me with the latest patch. I just get tracks by the original artist.

Working fine for me. Does it show similar artists in Music Explorer tab?
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 16, 2019, 02:47:32 AM
Thanks for adding google as a source option and reducing the rotation period from 90 sec to 60 sec!

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

Of course MB can't tell album cover from artist picture. But the problem is it is saving album cover as artist picture for some artists and there is no way to stop it from doing this. I don't think it's just me and probably people will start complaining about it after official release. For saving local thumb, I have lots of obscure artists and it would take months and I'd rather like to see my own cover as a fallback without saving a wrong cover thumb for them.
How about adding an option that would disable auto-downloading of artist picture? People have been requesting this feature regardless of this issue and I could use the option by only enabling it when updating artist pictures and then removing downloaded covers.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 16, 2019, 05:54:54 PM
I agree the artist thumbnail images are weaker than before. There is already an option to force album covers to be displayed and I think i will set that as the default for new users
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 16, 2019, 06:05:36 PM
Play Similar and Auto DJ still aren't working for me with the latest patch. I just get tracks by the original artist.
try with the latest patch version:
https://getmusicbee.com/patches/MusicBee33_Patched.zip
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 16, 2019, 07:44:12 PM
There is already an option to force album covers to be displayed and I think i will set that as the default for new users

I don't see how that can be a solution unless I give up displaying artist thumb altogether. Anyway I'll stop bothering you with this and just create a wishlist item.
Title: Re: LastFM changes to API (02/05/19)
Post by: magpy on May 16, 2019, 10:58:59 PM
Play Similar and Auto DJ still aren't working for me with the latest patch. I just get tracks by the original artist.
try with the latest patch version:
https://getmusicbee.com/patches/MusicBee33_Patched.zip

That didn't fix it either, but I tried deleting my MusicBee folder in AppData and with factory settings it was working. I didn't want to have to set everything up again so I restored the settings and went through MusicBee3Settings.ini deleting every line that included AutoDj or LastFm, and after that it started working.

Diffing the two files after running MusicBee I found that "AutoDjSimilarityEnabled" was previously set to false somehow. Not sure if that's something I did accidentally or what. I haven't intentionally changed any preferences for months, and it was working fine until this these Last.FM API changes came about.
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 17, 2019, 11:27:05 AM
I noticed all Spotify API calls are getting 400 Bad Request error with v3.3.7075.

[edit] Well, probably not all, since I only tested artwork retrieval.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 17, 2019, 06:24:15 PM
Thanks for reporting this as an unintended change made its way into the code.
Its fixed now

https://getmusicbee.com/patches/MusicBee33_Patched.zip
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 19, 2019, 08:17:51 AM
I understand Google search can't be perfect. But it would be great if you can improve it to search more music-related pictures. Try these artists: Eagles, Scorpions, Genesis, Cream, Journey, Cars, Yes
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 19, 2019, 08:56:38 AM
I feel quite uncertain about using google for artist pictures. I have tried appending "Band" or "Artist" which fixes it some cases and makes it worse in others. Also "Band" doesnt work well for single artists.
Having said that I am trying appending "Music" now and so far that seems to work better
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 19, 2019, 08:59:34 AM
A lot of bands start with "The". Maybe you could add "Band" if artist name starts with "The".
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 19, 2019, 11:32:42 AM
i have added "Music" into the search terms for google artist searches
Title: Re: LastFM changes to API (02/05/19)
Post by: frankz on May 19, 2019, 01:55:17 PM
Not for nothing, but you can also add "site:last.fm" (or any other specific site or (I think) list of sites) to the google search and get only images from that/those sites.

Last.fm exposes their images to google search, so they must not mind this usage.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 19, 2019, 02:54:02 PM
Not for nothing, but you can also add "site:last.fm" (or any other specific site or (I think) list of sites) to the google search and get only images from that/those sites.
thats a great suggestion but trying now its returning a lot of album covers so I dont think that will work so well.
I will be interested to hear feedback from anyone on the tweaked search since this morning's change
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 19, 2019, 05:00:26 PM
Great improvement! Now it mostly retrieves music-related pictures. Trying now with Eagles, Scorpions, Genesis, Cream, Journey, Cars and Yes, it no longer shows a football team, animals, automobiles, food, or travel images and most of the retrieved images are of the specific band. It still shows no band picture for Love, but I guess you have to use local pictures for some artists unless they are widely popular with a unique name.
By the way, after re-enabling google, it didn't work immediately and I had to restart MB to make it actually show images from Google. Is it expected?
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on May 19, 2019, 05:06:44 PM
By the way, after re-enabling google, it didn't work immediately and I had to restart MB to make it actually show images from Google. Is it expected?
it should have automatically reset on starting the next artist. I will see whats involved with having it take immediate effect
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on May 19, 2019, 05:09:23 PM
You're right. It starts working with next artist. I tried the same artist.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on June 04, 2019, 05:58:19 PM
This (supposingly) should address the rate limiting still being applied to playcount sync
Just a reminder also that when you love a track, unless you have sync love rating enabled in the last.fm plugin settings, the love rating will only update the MB database

https://getmusicbee.com/patches/MusicBee33_Patched.zip
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on June 15, 2019, 04:45:20 PM
- as a fallback wikipedia is used if last.fm artist biography fails - however wikipedia is not ideal as its not specifically focused on music/  artists and i am expecting there will be some cases of rubbish results

Headings are not handled properly in almost every case.

e.g. https://en.wikipedia.org/wiki/Andr%C3%A1s_Schiff

Quote
Schiff is Distinguished Visiting Professor of Piano at the Barenboim–Said Akademie in Berlin.

Biography
Schiff was born in Budapest into

becomes

Quote
Schiff is Distinguished Visiting Professor of Piano at the Barenboim–Said Akademie in Berlin.BiographySchiff was born in Budapest into
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on June 15, 2019, 05:34:50 PM
This should work better:
https://getmusicbee.com/patches/MusicBee33_Patched.zip
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on June 15, 2019, 05:56:34 PM
Works great now. Thanks for the fix!
Title: Re: LastFM changes to API (02/05/19)
Post by: stardepp on June 18, 2019, 03:11:49 PM
I know Steven, you already told me not to ask for old features, but I ask again carefully.
The played play bar with the artist's metered counter now works reliably again in MusicBee 3.2. Can not you reintegrate this feature into MusicBee 3.3?

I would not really like to irritate.

(https://i.imgur.com/H941rgp.jpg)
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on June 18, 2019, 03:32:49 PM
I know Steven, you already told me not to ask for old features, but I ask again carefully.
The played play bar with the artist's metered counter now works reliably again in MusicBee 3.2. Can not you reintegrate this feature into MusicBee 3.3?

I think Steven have told you several times the feature is no longer supported unless last.fm changes their API policy. If it's that important to you, stick with v3.2 though there's no guarantee it will continue to work.
Title: Re: LastFM changes to API (02/05/19)
Post by: stardepp on June 18, 2019, 04:55:00 PM
Ok, I understand, but if that works again in Musicbee 3.2 then that can work in Musicbee 3.3 as well.
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on June 18, 2019, 05:23:08 PM
No, you don't seem to understand. Why do you think Steven removed lots of functionalities with last.fm even though they still work with v3.2?
Title: Re: LastFM changes to API (02/05/19)
Post by: stardepp on June 18, 2019, 05:59:51 PM
No, why should you remove functions that work well in 3.2?
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on June 18, 2019, 06:13:32 PM
Just as the topic of this thread says, last.fm changed their API policy, which forced Steven to remove some features for v3.3.

- Currently MusicBee exceeds app level rate limits by 10x ie. the requests would need to be reduced to 10% of current usage. Scrobbling is not affected for existing users, but new users cant reliably make the first connection to log on.
- I have identified track love, play count sync, similar artists and artist biographies as key functions that could be kept without exceeding the limits.

If such features are working more reliably recently with v3.2, probably that's because many people already started using v3.3.
Title: Re: LastFM changes to API (02/05/19)
Post by: Steven on June 18, 2019, 06:36:18 PM
@stardepp, as i already said I am not going to add this functionality back in for the reasons redwing stated

You could create a wishlist request for MB to show the artist play count based on the stats in musicbee itself
Title: Re: LastFM changes to API (02/05/19)
Post by: stardepp on June 19, 2019, 07:05:41 AM
Ok, now I understand it very well and will not ask for it anymore.

Quote
You could create a wishlist request for MB to show the artist play count based on the stats in musicbee itself

How do I do that exactly?
Title: Re: LastFM changes to API (02/05/19)
Post by: redwing on June 19, 2019, 11:52:30 AM
How do I do that exactly?

Create a new topic in the Wishlist sub-forum, if that's what you're asking.