Spotify & database support #1
Loading…
Reference in a new issue
No description provided.
Delete branch "astro/yellowcab:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
:3
Adding this note from the private Discord here so it can easily be found:
the Last Played fallback seems to currently show the second most recent track rather than the current track- I'll be looking into this when I get a chance tomorrow (er, today? it's midnight. I mean later the 27th.)
I'll also clean up the HTTP request code- currently we have code to check the HTTP status codes in multiple locations, and have the code to JSON unmarshal in multiple places as well, we should not be repeating ourselves like that.
Other than that, I think this is a really good start. We should also probably clean up the authentication flow but we can do that in a follow-up PR, it's not as important as getting the feature at all
The API for recently played (limit=1) seems to return one of the more recent ones, not exactly the second most recent - from my testing, one of the last 5-8. The API also doesn't show the most recent song or two when using a higher limit - most likely something on Spotify's end.
I'm not surprised- Last.FM is sometimes slow to record Spotify scrobbles, the late WavyFM (rest in peace) had that same issue. Unrelated, of course, but it's just not too surprising Spotify's API has some problems. I'll see if there's something we can do to make this work better but as you said this does seem to be on their end and I doubt there's too much we can do
Linking to a (old, but sill apparently relevant) Spotify community post about this endpoint
WIP: Spotify & database supportto Spotify & database support