mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-09 02:35:29 +00:00
spotify: fix credentials cache
Cache Spotify response instead of username and password. This should resolve frequent "New login to Spotify" emails. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1190>
This commit is contained in:
parent
57fe64b748
commit
a434607515
1 changed files with 2 additions and 4 deletions
|
@ -488,9 +488,7 @@ impl SpotifyAudioSrc {
|
|||
bail!("password is not set and credentials are not in cache");
|
||||
}
|
||||
|
||||
let cred = Credentials::with_password(&settings.username, &settings.password);
|
||||
cache.save_credentials(&cred);
|
||||
cred
|
||||
Credentials::with_password(&settings.username, &settings.password)
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -505,7 +503,7 @@ impl SpotifyAudioSrc {
|
|||
};
|
||||
|
||||
let (session, _credentials) =
|
||||
Session::connect(SessionConfig::default(), credentials, Some(cache), false).await?;
|
||||
Session::connect(SessionConfig::default(), credentials, Some(cache), true).await?;
|
||||
|
||||
let player_config = PlayerConfig {
|
||||
passthrough: true,
|
||||
|
|
Loading…
Reference in a new issue