From a798b8971ef16fd704eac42896b6d204df9fc104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 26 May 2025 18:43:17 +0200 Subject: [PATCH] [dl:ytdl] fix postprocessing/merge errors (#7581) don't use a hardcoded '.part' filename extension fixes regression introduced in 29d315e495a4965dad2ae3ff55488fa26588c645 --- gallery_dl/downloader/ytdl.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gallery_dl/downloader/ytdl.py b/gallery_dl/downloader/ytdl.py index 15e61ec3..03d21b3b 100644 --- a/gallery_dl/downloader/ytdl.py +++ b/gallery_dl/downloader/ytdl.py @@ -134,17 +134,18 @@ class YoutubeDLDownloader(DownloaderBase): self.out.start(pathfmt.path) if self.part: - pathfmt.kwdict["extension"] = pathfmt.prefix + "part" + pathfmt.kwdict["extension"] = pathfmt.prefix filename = pathfmt.build_filename(pathfmt.kwdict) pathfmt.kwdict["extension"] = info_dict["ext"] if self.partdir: path = os.path.join(self.partdir, filename) else: path = pathfmt.realdirectory + filename + path = path.replace("%", "%%") + "%(ext)s" else: - path = pathfmt.realpath + path = pathfmt.realpath.replace("%", "%%") - self._set_outtmpl(ytdl_instance, path.replace("%", "%%")) + self._set_outtmpl(ytdl_instance, path) try: ytdl_instance.process_info(info_dict) except Exception as exc: