add proxy support for SpotDL in download process

Fixes #35
This commit is contained in:
Kamil
2024-12-10 12:23:16 +00:00
parent 7676189625
commit 23d121e58f
2 changed files with 6 additions and 1 deletions

View File

@@ -211,6 +211,10 @@ def download_missing_tracks(self):
app.logger.debug(f"Found {cookie_file}, using it for spotDL")
command.append("--cookie-file")
command.append(cookie_file)
if app.config['SPOTDL_PROXY']:
app.logger.debug(f"Using proxy: {app.config['SPOTDL_PROXY']}")
command.append("--proxy")
command.append(app.config['SPOTDL_PROXY'])
result = subprocess.run(command, capture_output=True, text=True, timeout=90)
if result.returncode == 0 and os.path.exists(file_path):