[dl:ytdl] handle exceptions when processing playlists (#8085)

and prevent calling 'process_info()' with empty playlist entries
This commit is contained in:
Mike Fährmann
2025-08-22 22:32:46 +02:00
parent 3939954cbd
commit 81df42103e

View File

@@ -172,11 +172,19 @@ class YoutubeDLDownloader(DownloaderBase):
pathfmt.build_path()
self._set_outtmpl(ytdl_instance, pathfmt.realpath)
status = False
for entry in info_dict["entries"]:
if not entry:
continue
if self.rate_dyn is not None:
ytdl_instance.params["ratelimit"] = self.rate_dyn()
ytdl_instance.process_info(entry)
return True
try:
ytdl_instance.process_info(entry)
status = True
except Exception as exc:
self.log.debug("", exc_info=exc)
self.log.error("%s: %s", exc.__class__.__name__, exc)
return status
def _extract_info(self, ytdl, url):
return ytdl.extract_info(url, download=False)