From 6adae316416b4ff5c2432b4340ee340aa31b820a Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 25 Jan 2026 14:45:11 +0700 Subject: [PATCH] fix unittests, empty cookiefile --- backend/download/src/yt_dlp_base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/download/src/yt_dlp_base.py b/backend/download/src/yt_dlp_base.py index f6d58952..9fc0be6a 100644 --- a/backend/download/src/yt_dlp_base.py +++ b/backend/download/src/yt_dlp_base.py @@ -134,6 +134,10 @@ class YtWrap: def _validate_cookie(self): """check cookie and write it back for next use""" + if not self.obs.get("cookiefile"): + # empty in tests + return + self.obs["cookiefile"].seek(0) new_cookie = self.obs["cookiefile"].read().strip("\x00")