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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user