Closed joeyy-watts closed 10 months ago
I'm not sure what the exact rate limit on the Spotify API is; I was only able to find that the limit is in a 30-second rolling window (https://developer.spotify.com/documentation/web-api/concepts/rate-limits).
So the current default for polling interval is 10 seconds to be conservative.
Although it seems reasonable to just decrease the polling interval to just ~3-5 seconds or something; the update delay wouldn't be too long and the number of requests isn't ridiculous.
Considering using WebSocket: https://github.com/lrholmes/spotify-connect-ws
(still uses polling, but this way I can remove the polling code)
Additional ref: https://github.com/spotify/web-api/issues/492
2 second polling interval is pretty much stable and doesn't cause much issue, so closing this issue until a better option is available.
If track ends by it self, the script will instantaneously switch cover already. But it is not handled when the track is skip; hence we'll still resort to the polling period, which can sometimes lead to long period before the image is updated when a track is skipped.