From c6b88a96bd191711fc540d7babab3d2e09c68da8 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Fri, 29 Apr 2022 01:58:56 -0400 Subject: New upstream version 1.21.2. --- gallery_dl/postprocessor/ugoira.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'gallery_dl/postprocessor') diff --git a/gallery_dl/postprocessor/ugoira.py b/gallery_dl/postprocessor/ugoira.py index c5477d2..fb57e84 100644 --- a/gallery_dl/postprocessor/ugoira.py +++ b/gallery_dl/postprocessor/ugoira.py @@ -49,7 +49,7 @@ class UgoiraPP(PostProcessor): mkvmerge or shutil.which("mkvmerge")): demuxer = "mkvmerge" else: - demuxer = "concat" if util.WINDOWS else "image2" + demuxer = "concat" if demuxer == "mkvmerge": self._process = self._process_mkvmerge @@ -137,6 +137,8 @@ class UgoiraPP(PostProcessor): self.log.error("Unable to invoke FFmpeg (%s: %s)", exc.__class__.__name__, exc) pathfmt.realpath = pathfmt.temppath + except Exception: + pathfmt.realpath = pathfmt.temppath else: if self.mtime: mtime = pathfmt.kwdict.get("_mtime") @@ -150,7 +152,13 @@ class UgoiraPP(PostProcessor): def _exec(self, args): self.log.debug(args) out = None if self.output else subprocess.DEVNULL - return subprocess.Popen(args, stdout=out, stderr=out).wait() + retcode = subprocess.Popen(args, stdout=out, stderr=out).wait() + if retcode: + print() + self.log.error("Non-zero exit status when running %s (%s)", + args, retcode) + raise ValueError() + return retcode def _process_concat(self, pathfmt, tempdir): rate_in, rate_out = self.calculate_framerate(self._frames) @@ -215,7 +223,7 @@ class UgoiraPP(PostProcessor): def _finalize_mkvmerge(self, pathfmt, tempdir): args = [ self.mkvmerge, - "-o", self._realpath, + "-o", pathfmt.path, # mkvmerge does not support "raw" paths "--timecodes", "0:" + self._write_mkvmerge_timecodes(tempdir), ] if self.extension == "webm": -- cgit v1.2.3