From 299338ff806003ef91e0ec17cccbcbdecd9a1b6d Mon Sep 17 00:00:00 2001 From: Mattias Tall Date: Tue, 26 May 2026 10:01:24 +0200 Subject: [PATCH] Fix double _cookie_args() call in download; fix diagnostic player client Co-Authored-By: Claude Sonnet 4.6 --- backend/routers/settings.py | 2 +- backend/services/ytdlp.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/routers/settings.py b/backend/routers/settings.py index cbb8711..07ef79e 100644 --- a/backend/routers/settings.py +++ b/backend/routers/settings.py @@ -230,7 +230,7 @@ def ytdlp_test( "yt-dlp", "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "--dump-json", "--no-download", "--no-playlist", - "--extractor-args", "youtube:player_client=tv,ios,web", + "--extractor-args", "youtube:player_client=web", *cookie_args, ], capture_output=True, text=True, timeout=30, diff --git a/backend/services/ytdlp.py b/backend/services/ytdlp.py index 7063997..c58a844 100644 --- a/backend/services/ytdlp.py +++ b/backend/services/ytdlp.py @@ -556,7 +556,7 @@ def start_download( def _run_download(): with _SEMAPHORE: cookie_args = _cookie_args() - print(f"[ytdlp] cookie_args={cookie_args!r} file_exists={Path(cookie_args[1]).exists() if len(cookie_args) == 2 and cookie_args[0] == '--cookies' else 'n/a'}", flush=True) + print(f"[ytdlp] cookie_args={cookie_args!r}", flush=True) process = subprocess.Popen( [ "yt-dlp", url, @@ -568,7 +568,7 @@ def start_download( "-o", output_template, "--newline", "--progress", "--no-colors", "--extractor-args", "youtube:player_client=web", - *_cookie_args(), + *cookie_args, ], stdout=subprocess.PIPE, stderr=subprocess.STDOUT,