fix(musicseerr): handle internal spotDL errors when return code is 0
Build and Push Docker Images / build (api) (push) Successful in 2m28s
Details
Build and Push Docker Images / build (musicseerr) (push) Successful in 6m26s
Details
Build and Push Docker Images / build (web) (push) Successful in 3m7s
Details
Build and Push Docker Images / build (nextgen) (push) Successful in 8m21s
Details
Build and Push Docker Images / build (worker) (push) Successful in 12m37s
Details
Build and Push Docker Images / deploy (push) Successful in 1m19s
Details
Build and Push Docker Images / build (api) (push) Successful in 2m28s
Details
Build and Push Docker Images / build (musicseerr) (push) Successful in 6m26s
Details
Build and Push Docker Images / build (web) (push) Successful in 3m7s
Details
Build and Push Docker Images / build (nextgen) (push) Successful in 8m21s
Details
Build and Push Docker Images / build (worker) (push) Successful in 12m37s
Details
Build and Push Docker Images / deploy (push) Successful in 1m19s
Details
This commit is contained in:
parent
2ac0645019
commit
e23ef8fd09
|
|
@ -425,7 +425,8 @@ def run_download_task(task_id: str, query: str, proxy_url: str, jobs_dict: dict,
|
||||||
|
|
||||||
logger.info(f"[{task_id}] [Track {idx+1}] Trying spotDL...")
|
logger.info(f"[{task_id}] [Track {idx+1}] Trying spotDL...")
|
||||||
result = subprocess.run(cmd, cwd=temp_dir, env=env, capture_output=True, text=True)
|
result = subprocess.run(cmd, cwd=temp_dir, env=env, capture_output=True, text=True)
|
||||||
if result.returncode == 0:
|
has_error = "AudioProviderError" in result.stdout or "AudioProviderError" in result.stderr or "LookupError" in result.stdout or "LookupError" in result.stderr or "JSONDecodeError" in result.stdout or "JSONDecodeError" in result.stderr
|
||||||
|
if result.returncode == 0 and not has_error:
|
||||||
logger.info(f"[{task_id}] [Track {idx+1}] spotDL succeeded.")
|
logger.info(f"[{task_id}] [Track {idx+1}] spotDL succeeded.")
|
||||||
track_success = True
|
track_success = True
|
||||||
else:
|
else:
|
||||||
|
|
@ -504,7 +505,8 @@ def run_download_task(task_id: str, query: str, proxy_url: str, jobs_dict: dict,
|
||||||
|
|
||||||
# Run spotDL in the temp directory
|
# Run spotDL in the temp directory
|
||||||
result = subprocess.run(cmd, cwd=temp_dir, env=env, capture_output=True, text=True)
|
result = subprocess.run(cmd, cwd=temp_dir, env=env, capture_output=True, text=True)
|
||||||
if result.returncode == 0:
|
has_error = "AudioProviderError" in result.stdout or "AudioProviderError" in result.stderr or "LookupError" in result.stdout or "LookupError" in result.stderr or "JSONDecodeError" in result.stdout or "JSONDecodeError" in result.stderr
|
||||||
|
if result.returncode == 0 and not has_error:
|
||||||
logger.info(f"[{task_id}] spotDL download succeeded.")
|
logger.info(f"[{task_id}] spotDL download succeeded.")
|
||||||
download_successful = True
|
download_successful = True
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue