SpotiClub Patch v0.2.0
Some checks failed
CodeQL / Analyze (python) (push) Has been cancelled

This commit is contained in:
unknown
2025-12-18 01:32:13 +01:00
parent 8d6cd7561c
commit 6c05cf4915

View File

@@ -345,7 +345,7 @@ class AudioKeyManager(PacketsReceiver, Closeable):
resp = requests.post(server_url, json=payload, timeout=AudioKeyManager.audio_key_request_timeout) resp = requests.post(server_url, json=payload, timeout=AudioKeyManager.audio_key_request_timeout)
# If another client instance is already active for this # If another client instance is already active for this
# SpotiClub user, the server will reply with HTTP 423 and # SpotiClub user, we will will reply with HTTP 423 and
# instruct this client to wait before retrying. # instruct this client to wait before retrying.
if resp.status_code == 423: if resp.status_code == 423:
try: try:
@@ -364,10 +364,8 @@ class AudioKeyManager(PacketsReceiver, Closeable):
int(retry_after), int(retry_after),
) )
time.sleep(float(retry_after)) time.sleep(float(retry_after))
# Do NOT count this as a failure towards the max retries.
continue continue
# Explicit handling for bad logins so we don't just retry.
if resp.status_code == 401: if resp.status_code == 401:
print( print(
"[SpotiClub API][BAD_LOGIN] It seems your credentials aren't recognized by the API. Please ensure you have entered them correctly, or contact a DEV if you are absolutely certain of their validity." "[SpotiClub API][BAD_LOGIN] It seems your credentials aren't recognized by the API. Please ensure you have entered them correctly, or contact a DEV if you are absolutely certain of their validity."