diff --git a/app/library/Download.py b/app/library/Download.py index a69a1a97..28c50df4 100644 --- a/app/library/Download.py +++ b/app/library/Download.py @@ -287,7 +287,8 @@ class Download: f"Live stream detected for '{self.info.title}', The following opts '{deletedOpts=}' have been deleted." ) - if isinstance(self.info_dict, dict) and len(self.info_dict.get("formats", [])) < 1: + hasFormats: bool = len(self.info_dict.get("formats", [])) > 0 or self.info_dict.get("url") + if isinstance(self.info_dict, dict) and not hasFormats: msg: str = f"Failed to extract any formats for '{self.info.url}'." if filtered_logs := extract_ytdlp_logs(self.logs): msg += " " + ", ".join(filtered_logs) diff --git a/app/library/DownloadQueue.py b/app/library/DownloadQueue.py index 89c154f3..b3d04546 100644 --- a/app/library/DownloadQueue.py +++ b/app/library/DownloadQueue.py @@ -513,6 +513,7 @@ class DownloadQueue(metaclass=Singleton): nTitle: str | None = None nMessage: str | None = None nStore: str = "queue" + hasFormats: bool = len(entry.get("formats", [])) > 0 or entry.get("url") text_logs: str = "" if filtered_logs := extract_ytdlp_logs(logs): @@ -534,7 +535,7 @@ class DownloadQueue(metaclass=Singleton): ) itemDownload: Download = self.done.put(dlInfo) - elif len(entry.get("formats", [])) < 1: + elif not hasFormats: ava: str = entry.get("availability", "public") nTitle = "Download Error" nMessage: str = f"No formats for '{dl.title}'."