fix: spotify_credentials_path in deezer class

This commit is contained in:
Xoconoch
2025-08-28 07:37:34 -06:00
parent 6d33201a71
commit 4ef72a91e5
2 changed files with 18 additions and 3 deletions

View File

@@ -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: