Remove cookies.txt requirement

fixes #5
This commit is contained in:
Kamil
2024-11-24 16:23:54 +00:00
parent e3d37576ed
commit 82390455d0

View File

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