@@ -142,10 +142,13 @@ def download_missing_tracks(self):
|
|||||||
command = [
|
command = [
|
||||||
"spotdl", "download", s_url,
|
"spotdl", "download", s_url,
|
||||||
"--output", output_dir,
|
"--output", output_dir,
|
||||||
"--cookie-file", cookie_file,
|
|
||||||
"--client-id", client_id,
|
"--client-id", client_id,
|
||||||
"--client-secret", client_secret
|
"--client-secret", client_secret
|
||||||
]
|
]
|
||||||
|
if os.path.exists(cookie_file):
|
||||||
|
app.logger.debug(f"Found {cookie_file}, using it for spotDL")
|
||||||
|
command.append("--cookie-file")
|
||||||
|
command.append(cookie_file)
|
||||||
|
|
||||||
result = subprocess.run(command, capture_output=True, text=True, timeout=90)
|
result = subprocess.run(command, capture_output=True, text=True, timeout=90)
|
||||||
if result.returncode == 0 and os.path.exists(file_path):
|
if result.returncode == 0 and os.path.exists(file_path):
|
||||||
|
|||||||
Reference in New Issue
Block a user