mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-26 04:32:51 +01:00
[postprocessor:ugoira] support danbooru sources
This commit is contained in:
parent
5b8a314de7
commit
02a4a67f6d
@ -34,11 +34,16 @@ class UgoiraPP(PostProcessor):
|
||||
self.calculate_framerate = lambda _: (None, rate)
|
||||
|
||||
def run(self, pathfmt):
|
||||
if (pathfmt.keywords["extension"] != "zip" or
|
||||
"frames" not in pathfmt.keywords):
|
||||
if pathfmt.keywords["extension"] != "zip":
|
||||
return
|
||||
|
||||
if "frames" in pathfmt.keywords:
|
||||
framelist = pathfmt.keywords["frames"]
|
||||
elif "pixiv_ugoira_frame_data" in pathfmt.keywords:
|
||||
framelist = pathfmt.keywords["pixiv_ugoira_frame_data"]["data"]
|
||||
else:
|
||||
return
|
||||
|
||||
framelist = pathfmt.keywords["frames"]
|
||||
rate_in, rate_out = self.calculate_framerate(framelist)
|
||||
|
||||
with tempfile.TemporaryDirectory() as tempdir:
|
||||
|
Loading…
Reference in New Issue
Block a user