1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[pp:ugoira] forward frame data as '_ugoira_frame_data' (#6154, #6285)

This commit is contained in:
Mike Fährmann 2024-10-08 11:28:44 +02:00
parent c0835a0cd1
commit cc38042500
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
3 changed files with 5 additions and 4 deletions

View File

@ -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"]

View File

@ -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

View File

@ -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: