joeyy-watts / SpotifyWLED

A script to listen to the currently playing track on your Spotify account and forward it to a WLED (https://github.com/Aircoookie/WLED) LED matrix with support for animations.
2 stars 0 forks source link

Utilize Spotify API HTTP 304 #19

Open joeyy-watts opened 10 months ago

joeyy-watts commented 10 months ago

https://developer.spotify.com/documentation/web-api/concepts/api-calls

Spotify API has mechanism to return 304 Not Modified if the response has not changed. This can be used to do away with any state change logic in the code.

Although I will have to implement Spotify API logic myself, as currently SpotifyAPIHandler uses spotipy that doesn't handle 304s