[GH-ISSUE #1168] Write credentials to cache only if they are changed #539

Closed
opened 2026-02-27 19:31:11 +03:00 by kerem · 1 comment
Owner

Originally created by @beaverking1212 on GitHub (May 17, 2023).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1168

Is your feature request related to a problem? Please describe.
A minor problem. When login with cached credentials and store_credentials is true in call to Session::connect() the file with cached credentials is written every time Session::connect() is called. The contents of the file usually do not change with these writes.

Describe the solution you'd like
The file with cached credentials should be written only if cached credentials have changed (have been updated by Spotify).

Describe alternatives you've considered
Set store_credentials to false and use code that writes credentials to cache if they are changed.
gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-@ea26d0d6d5/audio/spotify/src/common.rs (L162)

Additional context
Problem was noticed in: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1195

Originally created by @beaverking1212 on GitHub (May 17, 2023). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1168 **Is your feature request related to a problem? Please describe.** A minor problem. When login with cached credentials and `store_credentials` is `true` in call to `Session::connect()` the file with cached credentials is written every time `Session::connect()` is called. The contents of the file usually do not change with these writes. **Describe the solution you'd like** The file with cached credentials should be written only if cached credentials have changed (have been updated by Spotify). **Describe alternatives you've considered** Set `store_credentials` to `false` and use code that writes credentials to cache if they are changed. https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/blob/ea26d0d6d50bc0fd394c8934b14d18266671264b/audio/spotify/src/common.rs#L162 **Additional context** Problem was noticed in: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1195
kerem 2026-02-27 19:31:11 +03:00
Author
Owner

@beaverking1212 commented on GitHub (May 17, 2023):

@gdesmott

<!-- gh-comment-id:1550624465 --> @beaverking1212 commented on GitHub (May 17, 2023): @gdesmott
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#539
No description provided.