fix: spotify_credentials_path in deezer class
This commit is contained in:
@@ -2,6 +2,7 @@ from __future__ import annotations
|
||||
|
||||
import base64
|
||||
import datetime
|
||||
import time
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
|
||||
@@ -144,7 +145,16 @@ class LibrespotClient:
|
||||
)
|
||||
builder = Session.Builder(conf)
|
||||
builder.stored_file(stored_credentials_path)
|
||||
return builder.create()
|
||||
last_exc: Optional[Exception] = None
|
||||
for attempt in range(1, 4):
|
||||
try:
|
||||
return builder.create()
|
||||
except Exception as exc:
|
||||
last_exc = exc
|
||||
if attempt < 3:
|
||||
time.sleep(1)
|
||||
else:
|
||||
raise last_exc
|
||||
|
||||
def _get_session_country_code(self) -> str:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user