chore(deps): Bump rspotify to 0.13.0

* Bump rspotify to 0.13.0

Fixes #1384

* Write changelog

* chore: Migrate away from deprecated constructor

---------

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
This commit is contained in:
cyqsimon
2024-03-10 05:33:54 +08:00
committed by GitHub
parent 6aa1cd9817
commit 228160608e
4 changed files with 43 additions and 37 deletions

View File

@@ -105,13 +105,13 @@ impl WebApi {
if let Ok(Some(token)) = token_rx.recv() {
*api_token.lock().unwrap() = Some(Token {
access_token: token.access_token,
expires_in: chrono::Duration::seconds(token.expires_in.into()),
expires_in: chrono::Duration::try_seconds(token.expires_in.into()).unwrap(),
scopes: HashSet::from_iter(token.scope),
expires_at: None,
refresh_token: None,
});
*api_token_expiration.write().unwrap() =
Utc::now() + ChronoDuration::seconds(token.expires_in.into());
Utc::now() + ChronoDuration::try_seconds(token.expires_in.into()).unwrap();
} else {
error!("Failed to update token");
}