lofi icon indicating copy to clipboard operation
lofi copied to clipboard

Use Web Playback SDK instead of polling to prevent 429

Open stamoun opened this issue 3 years ago • 4 comments

https://developer.spotify.com/documentation/web-playback-sdk/quick-start/

This most likely would allow Lofi to not trigger any 429, which would be a GREAT improvement.

Would fix the following: #107, #134, #166, #171, #177, #183

stamoun avatar Mar 14 '22 14:03 stamoun

Seems like the web player sdk requires a premium sub. If that is the case, non-premium users won't have anything showing (cover art, volume, seek position, etc.), I need to investigate it properly.

One solution for non-premium users would be to use the current way of retrieving playback info (maybe slow down the polling to 2 seconds). TBD

stamoun avatar Mar 14 '22 17:03 stamoun

This could be another option worth investigating

stamoun avatar Mar 22 '23 18:03 stamoun

Just checking in to see if there's any progress around this change, and or the 429 rate limit?

My LoFi is harassed by rate limits...

Possibly allowing a user defined rate limit instead of 1s, maybe 2s, 5s, or even 10s?

I for one would not be opposed to creating my own API keys to avoid any global rate limits...

Fruit for thought....

image

level42ca avatar Feb 07 '24 17:02 level42ca

We could, in theory allow uses to provide their own API key, not sure it'll help much with the 429 throttling though. The Web SDK replacement is also a major change, but it would allow Lofi to get rid of throttling once and for all (only for premium users though, free accounts will still have to use the REST API and live with the throttling, sadly).

stamoun avatar Feb 07 '24 18:02 stamoun