bugfix(spotify): Fixed reauthentication issue

* Reinserting self.authenticate() back into 401 reauthentication flow
This commit is contained in:
kuelteabmas
2025-05-18 22:03:02 -04:00
parent ff99475fab
commit 1e18576a88

View File

@@ -191,6 +191,7 @@ class SpotifyClient(MusicProviderClient):
# if the response is unauthorized, we need to reauthenticate
if response.status_code == 401:
l.debug("reauthenticating")
self.authenticate()
headers['authorization'] = f'Bearer {self.access_token}'
headers['client-token'] = self.client_token.get('token','')
response = requests.get(f"{self.base_url}/{endpoint}", headers=headers, params=params, cookies=self.cookies)