Closed joshcomley closed 1 month ago
Thanks for this PR! It's addressing a valid issue. Alas, I think it could be handled more elegantly: you could register a setChange()
handler to remove the spotty_rate_limit_exceeded
flag whenever the client ID is changed. See eg. https://github.com/michaelherger/Spotty-Plugin/blob/master/Plugin.pm#L79 for how such a handler can be implemented.
Hi @michaelherger - no worries, thanks for the project!
Good idea, although I did like the fact that no matter how the client ID changes the call to the API would pick up on the change. Nevertheless, I've pushed an update - I've tested and it seems to work! I am VERY new to Perl, so forgive any mistakes :D
The rate limit cache locks out API requests until the timeout reported by Spotify has reached. However, this timeout can be very long (hours), and if the client ID used when the rate limit was reached has changed, we should be able to try again.