icidasset / diffuse

A music player that connects to your cloud/distributed storage.
https://diffuse.sh
Other
808 stars 67 forks source link

Improve access token expiration handling #345

Closed icidasset closed 2 years ago

icidasset commented 2 years ago

Access tokens for Google Drive are refreshed every time that source is processed. The problem with that is the access token can expire at some point during the processing (resulting in a bunch of tracks with the artist + title "Unknown"), and also that the playing of these tracks depends on the source being processed (eg. when you disable automatic processing, it no longer works).

Ideally every time a new track is going to be processed, the access token expiration should be checked (just a simple timestamp check). And, whenever a track is going to be played, it should be checked as well.

Dropbox will have the same issue when we move away from the legacy auth flow (see #320).