From 1aae9f2b71fbf271529af35123ecfb2895d377af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 19 Jun 2022 12:11:48 +0200 Subject: [PATCH] [downloader:ytdl] update _set_outtmpl() (fixes #2692) https://github.com/yt-dlp/yt-dlp/commit/bf1824b391e2f18b7e927f54340c0aabfa9399cd --- gallery_dl/downloader/ytdl.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gallery_dl/downloader/ytdl.py b/gallery_dl/downloader/ytdl.py index 2badccf4..efa957b4 100644 --- a/gallery_dl/downloader/ytdl.py +++ b/gallery_dl/downloader/ytdl.py @@ -138,9 +138,14 @@ class YoutubeDLDownloader(DownloaderBase): @staticmethod def _set_outtmpl(ytdl_instance, outtmpl): try: - ytdl_instance.outtmpl_dict["default"] = outtmpl + ytdl_instance._parse_outtmpl except AttributeError: - ytdl_instance.params["outtmpl"] = outtmpl + try: + ytdl_instance.outtmpl_dict["default"] = outtmpl + except AttributeError: + ytdl_instance.params["outtmpl"] = outtmpl + else: + ytdl_instance.params["outtmpl"] = {"default": outtmpl} def compatible_formats(formats):