[dl:ytdl] handle exceptions when processing playlists (#8085)
and prevent calling 'process_info()' with empty playlist entries
This commit is contained in:
@@ -172,11 +172,19 @@ class YoutubeDLDownloader(DownloaderBase):
|
|||||||
pathfmt.build_path()
|
pathfmt.build_path()
|
||||||
self._set_outtmpl(ytdl_instance, pathfmt.realpath)
|
self._set_outtmpl(ytdl_instance, pathfmt.realpath)
|
||||||
|
|
||||||
|
status = False
|
||||||
for entry in info_dict["entries"]:
|
for entry in info_dict["entries"]:
|
||||||
|
if not entry:
|
||||||
|
continue
|
||||||
if self.rate_dyn is not None:
|
if self.rate_dyn is not None:
|
||||||
ytdl_instance.params["ratelimit"] = self.rate_dyn()
|
ytdl_instance.params["ratelimit"] = self.rate_dyn()
|
||||||
ytdl_instance.process_info(entry)
|
try:
|
||||||
return True
|
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):
|
def _extract_info(self, ytdl, url):
|
||||||
return ytdl.extract_info(url, download=False)
|
return ytdl.extract_info(url, download=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user