From 99ba5d6d8a6d781a45f76221fe8cdbf26f6359c7 Mon Sep 17 00:00:00 2001 From: oop7 <110548351+oop7@users.noreply.github.com> Date: Thu, 14 May 2026 12:37:56 +0300 Subject: [PATCH] Ignore playlist errors; normalize version cache When downloading playlists, add --ignore-errors and --no-abort-on-error so a single failure won't stop the entire playlist download. Also normalize values stored in the version cache: coerce version_info to a string (or empty string) and path to a string or None to ensure consistent types when reading/writing cached tool metadata. --- ytsage/core/ytsage_downloader.py | 3 +++ ytsage/core/ytsage_utils.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ytsage/core/ytsage_downloader.py b/ytsage/core/ytsage_downloader.py index d44b121..aa15965 100644 --- a/ytsage/core/ytsage_downloader.py +++ b/ytsage/core/ytsage_downloader.py @@ -413,6 +413,9 @@ class DownloadThread(QThread): logger.debug(f"Added download section: {self.download_section}, Force keyframes: {self.force_keyframes}") # Add the URL as the final argument + if self.is_playlist: + cmd.append("--ignore-errors") + cmd.append("--no-abort-on-error") cmd.append(self.url) return cmd diff --git a/ytsage/core/ytsage_utils.py b/ytsage/core/ytsage_utils.py index bea2cd6..86cffea 100644 --- a/ytsage/core/ytsage_utils.py +++ b/ytsage/core/ytsage_utils.py @@ -94,8 +94,8 @@ def update_version_cache(tool_name: str, version_info: str, path: Optional[str], current_mtime: float = get_file_mtime(path) _version_cache[tool_name] = { - "version": version_info, - "path": path, + "version": str(version_info) if version_info else "", + "path": str(path) if path else None, "last_check": current_time, "path_mtime": current_mtime, }