From 0e84865560976a0077102eda414f7a777a9398b6 Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Fri, 29 Apr 2016 15:57:17 +0200 Subject: [PATCH] fix ident prosopopee.py --- prosopopee/prosopopee.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index 8b9e4e3..121a1a7 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -53,15 +53,15 @@ class Video(object): def ffmpeg(self, source, target, options): if CACHE.needs_to_be_generated(source, target, options): ffmpeg_switches = { - "source": source, - "target": target, - "loglevel": "-loglevel %s" % options["loglevel"], - "resolution": "-s %s" % options["resolution"], - "preselect": "-vpre %s" % options["preselect"], - "resize": "-vf scale=-1:%s" % options.get("resize"), - "bitrate": "-b %s" % options["bitrate"], - "format": "-f %s" % options["format"] - } + "source": source, + "target": target, + "loglevel": "-loglevel %s" % options["loglevel"], + "resolution": "-s %s" % options["resolution"], + "preselect": "-vpre %s" % options["preselect"], + "resize": "-vf scale=-1:%s" % options.get("resize"), + "bitrate": "-b %s" % options["bitrate"], + "format": "-f %s" % options["format"] + } warning("Generation", source) if options.get("resize"): command = "ffmpeg {loglevel} -i {source} {resize} -vframes 1 -y {target}".format(**ffmpeg_switches) @@ -113,13 +113,13 @@ class Image(object): def gm(self, source, target, options): if CACHE.needs_to_be_generated(source, target, options): gm_switches = { - "source": source, - "target": target, - "auto-orient": "-auto-orient" if options["auto-orient"] else "", - "strip": "-strip" if options["strip"] else "", - "quality": "-quality %s" % options["quality"] if "quality" in options else "-define jpeg:preserve-settings", - "resize": "-resize %s" % options["resize"] if options.get("resize", None) is not None else "" - } + "source": source, + "target": target, + "auto-orient": "-auto-orient" if options["auto-orient"] else "", + "strip": "-strip" if options["strip"] else "", + "quality": "-quality %s" % options["quality"] if "quality" in options else "-define jpeg:preserve-settings", + "resize": "-resize %s" % options["resize"] if options.get("resize", None) is not None else "" + } command = "gm convert {source} {auto-orient} {strip} {quality} {resize} {target}".format(**gm_switches) warning("Generation", source) os.system(command)