From 3e7a5fcb00a9a687b8c861c4784639ba30109487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sat, 24 May 2025 19:58:09 +0200 Subject: [PATCH] [dl:ytdl] fix crash when using legacy 'youtube_dl' (#6949) https://github.com/mikf/gallery-dl/issues/6949#issuecomment-2906920039 fixes regression introduced in 29d315e495a4965dad2ae3ff55488fa26588c645 --- gallery_dl/downloader/ytdl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gallery_dl/downloader/ytdl.py b/gallery_dl/downloader/ytdl.py index 1fc2f827..d9f30b2c 100644 --- a/gallery_dl/downloader/ytdl.py +++ b/gallery_dl/downloader/ytdl.py @@ -150,7 +150,7 @@ class YoutubeDLDownloader(DownloaderBase): self.log.debug("", exc_info=exc) return False - pathfmt.temppath = info_dict["filepath"] + pathfmt.temppath = info_dict.get("filepath") or info_dict["_filename"] return True def _download_playlist(self, ytdl_instance, pathfmt, info_dict):