From f8bb0fd6cbd22e4e22e0dbd225cb34949e493e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 11 Oct 2024 13:19:45 +0200 Subject: [PATCH] [pixiv][danbooru] set '_ugoira_original' for ugoira results --- gallery_dl/extractor/danbooru.py | 1 + gallery_dl/extractor/pixiv.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/gallery_dl/extractor/danbooru.py b/gallery_dl/extractor/danbooru.py index ae9ebcbf..1746647e 100644 --- a/gallery_dl/extractor/danbooru.py +++ b/gallery_dl/extractor/danbooru.py @@ -93,6 +93,7 @@ class DanbooruExtractor(BaseExtractor): if post["extension"] == "zip": if self.ugoira: + post["_ugoira_original"] = False post["_ugoira_frame_data"] = post["frames"] = \ self._ugoira_frames(post) post["_http_adjust_extension"] = False diff --git a/gallery_dl/extractor/pixiv.py b/gallery_dl/extractor/pixiv.py index 4e0bacfd..c2d12438 100644 --- a/gallery_dl/extractor/pixiv.py +++ b/gallery_dl/extractor/pixiv.py @@ -150,6 +150,7 @@ class PixivExtractor(Extractor): work["_http_adjust_extension"] = False if self.load_ugoira == "original": + work["_ugoira_original"] = True base, sep, _ = url.rpartition("_ugoira") base = base.replace("/img-zip-ugoira/", "/img-original/", 1) + sep @@ -173,6 +174,7 @@ class PixivExtractor(Extractor): for num in range(len(frames)) ] else: + work["_ugoira_original"] = False url = url.replace("_ugoira600x600", "_ugoira1920x1080", 1) return ({"url": url},)