@@ -93,7 +93,8 @@ class DanbooruExtractor(BaseExtractor):
|
|||||||
|
|
||||||
if post["extension"] == "zip":
|
if post["extension"] == "zip":
|
||||||
if self.ugoira:
|
if self.ugoira:
|
||||||
post["frames"] = self._ugoira_frames(post)
|
post["_ugoira_frame_data"] = post["frames"] = \
|
||||||
|
self._ugoira_frames(post)
|
||||||
post["_http_adjust_extension"] = False
|
post["_http_adjust_extension"] = False
|
||||||
else:
|
else:
|
||||||
url = post["large_file_url"]
|
url = post["large_file_url"]
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ class PixivExtractor(Extractor):
|
|||||||
def _extract_ugoira(self, work):
|
def _extract_ugoira(self, work):
|
||||||
ugoira = self.api.ugoira_metadata(work["id"])
|
ugoira = self.api.ugoira_metadata(work["id"])
|
||||||
url = ugoira["zip_urls"]["medium"]
|
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["date_url"] = self._date_from_url(url)
|
||||||
work["_http_adjust_extension"] = False
|
work["_http_adjust_extension"] = False
|
||||||
|
|
||||||
|
|||||||
@@ -105,11 +105,11 @@ class UgoiraPP(PostProcessor):
|
|||||||
}, options)
|
}, options)
|
||||||
|
|
||||||
def prepare(self, pathfmt):
|
def prepare(self, pathfmt):
|
||||||
if "frames" not in pathfmt.kwdict:
|
if "_ugoira_frame_data" not in pathfmt.kwdict:
|
||||||
self._frames = None
|
self._frames = None
|
||||||
return
|
return
|
||||||
|
|
||||||
self._frames = pathfmt.kwdict["frames"]
|
self._frames = pathfmt.kwdict["_ugoira_frame_data"]
|
||||||
if pathfmt.extension == "zip":
|
if pathfmt.extension == "zip":
|
||||||
self._convert_zip = True
|
self._convert_zip = True
|
||||||
if self.delete:
|
if self.delete:
|
||||||
|
|||||||
Reference in New Issue
Block a user