From 0a048b4392b8ce2e2fe17867a82067f41db9def7 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Mon, 19 Aug 2024 23:57:50 +0200 Subject: [PATCH] small tweaks --- music_assistant/server/providers/spotify/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/music_assistant/server/providers/spotify/__init__.py b/music_assistant/server/providers/spotify/__init__.py index 32fae811..7535ea5d 100644 --- a/music_assistant/server/providers/spotify/__init__.py +++ b/music_assistant/server/providers/spotify/__init__.py @@ -755,7 +755,7 @@ class SpotifyProvider(MusicProvider): async def login(self) -> dict: """Log-in Spotify and return Auth/token info.""" # return existing token if we have one in memory - if self._auth_info and (self._auth_info["expires_at"] > (time.time() - 120)): + if self._auth_info and (self._auth_info["expires_at"] > (time.time() - 300)): return self._auth_info # request new access token using the refresh token @@ -783,7 +783,7 @@ class SpotifyProvider(MusicProvider): auth_info["expires_at"] = int(auth_info["expires_in"] + time.time()) self.logger.debug("Successfully refreshed access token") - # make sure that our updated creds get stored in memory + config config + # make sure that our updated creds get stored in memory + config self._auth_info = auth_info self.mass.config.set_raw_provider_config_value( self.instance_id, CONF_REFRESH_TOKEN, auth_info["refresh_token"], encrypted=True -- 2.34.1