diff options
| author | 2019-09-08 19:44:05 -0400 | |
|---|---|---|
| committer | 2019-09-08 19:44:05 -0400 | |
| commit | 1c412b8a74a5641399d41a7a280b3b435390e359 (patch) | |
| tree | 796162d852c7e6a68a46ef187e1caa62a838c6a4 /gallery_dl/postprocessor | |
| parent | 88413a3dd4cd67e1ce81ddc2cdb961abb57bbfba (diff) | |
| parent | c09a9f00dd83017d486cd77650347bc2a397ad55 (diff) | |
Update upstream source from tag 'upstream/1.10.4'
Update to upstream version '1.10.4'
with Debian dir e698207525578f8b853971aad79b54c7b608f6c8
Diffstat (limited to 'gallery_dl/postprocessor')
| -rw-r--r-- | gallery_dl/postprocessor/ugoira.py | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/gallery_dl/postprocessor/ugoira.py b/gallery_dl/postprocessor/ugoira.py index 0dbb796..162eb9e 100644 --- a/gallery_dl/postprocessor/ugoira.py +++ b/gallery_dl/postprocessor/ugoira.py @@ -103,20 +103,26 @@ class UgoiraPP(PostProcessor): # invoke ffmpeg pathfmt.set_extension(self.extension) - if self.twopass: - if "-f" not in args: - args += ["-f", self.extension] - args += ["-passlogfile", tempdir + "/ffmpeg2pass", "-pass"] - self._exec(args + ["1", "-y", os.devnull]) - self._exec(args + ["2", pathfmt.realpath]) + try: + if self.twopass: + if "-f" not in args: + args += ["-f", self.extension] + args += ["-passlogfile", tempdir + "/ffmpeg2pass", "-pass"] + self._exec(args + ["1", "-y", os.devnull]) + self._exec(args + ["2", pathfmt.realpath]) + else: + args.append(pathfmt.realpath) + self._exec(args) + except OSError as exc: + print() + self.log.error("Unable to invoke FFmpeg (%s: %s)", + exc.__class__.__name__, exc) + pathfmt.realpath = pathfmt.temppath else: - args.append(pathfmt.realpath) - self._exec(args) - - if self.delete: - pathfmt.delete = True - else: - pathfmt.set_extension("zip") + if self.delete: + pathfmt.delete = True + else: + pathfmt.set_extension("zip") def _exec(self, args): out = None if self.output else subprocess.DEVNULL |
