From cc3804250063732db05dacc563bed4d05ab21d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 8 Oct 2024 11:28:44 +0200 Subject: [PATCH] [pp:ugoira] forward frame data as '_ugoira_frame_data' (#6154, #6285) --- gallery_dl/extractor/danbooru.py | 3 ++- gallery_dl/extractor/pixiv.py | 2 +- gallery_dl/postprocessor/ugoira.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gallery_dl/extractor/danbooru.py b/gallery_dl/extractor/danbooru.py index 09beb5f1..ae9ebcbf 100644 --- a/gallery_dl/extractor/danbooru.py +++ b/gallery_dl/extractor/danbooru.py @@ -93,7 +93,8 @@ class DanbooruExtractor(BaseExtractor): if post["extension"] == "zip": if self.ugoira: - post["frames"] = self._ugoira_frames(post) + post["_ugoira_frame_data"] = post["frames"] = \ + self._ugoira_frames(post) post["_http_adjust_extension"] = False else: url = post["large_file_url"] diff --git a/gallery_dl/extractor/pixiv.py b/gallery_dl/extractor/pixiv.py index aed78d1d..68b9eef8 100644 --- a/gallery_dl/extractor/pixiv.py +++ b/gallery_dl/extractor/pixiv.py @@ -136,7 +136,7 @@ class PixivExtractor(Extractor): def _extract_ugoira(self, work): ugoira = self.api.ugoira_metadata(work["id"]) url = ugoira["zip_urls"]["medium"] - work["frames"] = frames = ugoira["frames"] + work["_ugoira_frame_data"] = work["frames"] = frames = ugoira["frames"] work["date_url"] = self._date_from_url(url) work["_http_adjust_extension"] = False diff --git a/gallery_dl/postprocessor/ugoira.py b/gallery_dl/postprocessor/ugoira.py index 247cc0f4..ae720713 100644 --- a/gallery_dl/postprocessor/ugoira.py +++ b/gallery_dl/postprocessor/ugoira.py @@ -105,11 +105,11 @@ class UgoiraPP(PostProcessor): }, options) def prepare(self, pathfmt): - if "frames" not in pathfmt.kwdict: + if "_ugoira_frame_data" not in pathfmt.kwdict: self._frames = None return - self._frames = pathfmt.kwdict["frames"] + self._frames = pathfmt.kwdict["_ugoira_frame_data"] if pathfmt.extension == "zip": self._convert_zip = True if self.delete: