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:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user