lofi icon indicating copy to clipboard operation
lofi copied to clipboard

Feature suggestion: settings to affect API callback rate

Open shinmai opened this issue 2 years ago • 1 comments

I see there are several issues discussing the fact that lofi hammers the Spotify API ~125 times per minute (getCurrentlyPlaying alone gets called once per second +change), with various suggested fixes/changes, but none of them seem to have gotten any love in years.

Would it be possible to just add a setting to allow users to throttle the rate at which, say, getCurrentlyPlaying is called or to disable the Like feature entirely?
If the former was set to two seconds instead of one, the number of requests would be reduced by 40%, the latter would reduce the number by 20%.

I genuinely don't care if lofi is out of sync with Spotify playback for a few seconds when songs change or to see if I've liked the track or not, but it IS very annoying to constantly see the "API calls throttled, wait Xs..." in the track info and have the playback controls be extremely unreliable.

I realise this would not be a huge change to make myself for a custom build, but if I could avoid having to install Python 2 and MS Build Tools, I would prefer that 😅

shinmai avatar Feb 09 '24 10:02 shinmai

Good idea, so if I summarize you'd like two things:

  • configure the delay to retrieve song info
  • remove the throttle warning (which honestly I did hastily) from the track info (maybe just as an icon like it was before, although the way the code sits it's not possible to have a tooltip right now)

stamoun avatar Feb 09 '24 14:02 stamoun