add database support to cache context data such as playlist/artist

Author: aome510Created Sep 9, 2026Updated Sep 9, 2026
Labelsenhancement

With the recent rate-limit issue, it's pretty annoying to wait ~20-30s for a request. We can start integrating a database to cache context data so that the cached result is returned immediately while the GET request running in the background updates the database after finishing.

We already do file cache with user data as in https://github.com/aome510/spotify-player/blob/dac1fa7aa2c120cc67ead9e9c5c661ff017a2b94/spotify_player/src/state/data.rs#L164-L186

perhaps these can be moved to the new database as well