aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/postprocessor
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-10-14 03:02:11 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2024-10-14 03:02:11 -0400
commitb28a9957b772b1d063bea4a50c0bbcb04cdef791 (patch)
treebdf3b3bafb821af5cd41206d66c4a0b7a60e2a92 /gallery_dl/postprocessor
parent061cbaf29e92e57152175f877740d3d1a2157bd6 (diff)
parent0db541f524e1774865efebcbe5653e9ad76ea2e8 (diff)
Update upstream source from tag 'upstream/1.27.6'
Update to upstream version '1.27.6' with Debian dir bbafbef8a09f7a005c8afa3ebb1c8527d67c172a
Diffstat (limited to 'gallery_dl/postprocessor')
-rw-r--r--gallery_dl/postprocessor/ugoira.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/gallery_dl/postprocessor/ugoira.py b/gallery_dl/postprocessor/ugoira.py
index 87a0ba6..fec4ab0 100644
--- a/gallery_dl/postprocessor/ugoira.py
+++ b/gallery_dl/postprocessor/ugoira.py
@@ -105,11 +105,12 @@ class UgoiraPP(PostProcessor):
}, options)
def prepare(self, pathfmt):
- if "frames" not in pathfmt.kwdict:
+ self._convert_zip = self._convert_files = False
+ 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:
@@ -136,7 +137,6 @@ class UgoiraPP(PostProcessor):
def convert_from_zip(self, pathfmt):
if not self._convert_zip:
return
- self._convert_zip = False
self._zip_source = True
with self._tempdir() as tempdir:
@@ -147,6 +147,13 @@ class UgoiraPP(PostProcessor):
except FileNotFoundError:
pathfmt.realpath = pathfmt.temppath
return
+ except Exception as exc:
+ pathfmt.realpath = pathfmt.temppath
+ self.log.error(
+ "%s: Unable to extract frames from %s (%s: %s)",
+ pathfmt.kwdict.get("id"), pathfmt.filename,
+ exc.__class__.__name__, exc)
+ return self.log.debug("", exc_info=exc)
if self.convert(pathfmt, tempdir):
if self.delete:
@@ -159,7 +166,6 @@ class UgoiraPP(PostProcessor):
def convert_from_files(self, pathfmt):
if not self._convert_files:
return
- self._convert_files = False
self._zip_source = False
with tempfile.TemporaryDirectory() as tempdir: