aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/postprocessor
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-10-14 03:02:05 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2024-10-14 03:02:05 -0400
commit0db541f524e1774865efebcbe5653e9ad76ea2e8 (patch)
treeb0fc6ce19628931f61c43f2dc9ebfd88a4332388 /gallery_dl/postprocessor
parent1a457ed68769880ab7760e0746f0cbbd9ca00487 (diff)
New upstream version 1.27.6.upstream/1.27.6
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: