rework post processor callbacks

This commit is contained in:
Mike Fährmann
2020-11-18 17:11:55 +01:00
parent d6986be8b0
commit 9fffa9c343
10 changed files with 109 additions and 121 deletions

View File

@@ -49,6 +49,9 @@ class UgoiraPP(PostProcessor):
else:
self.prevent_odd = False
job.hooks["prepare"].append(self.prepare)
job.hooks["file"].append(self.convert)
def prepare(self, pathfmt):
self._frames = None
@@ -65,7 +68,7 @@ class UgoiraPP(PostProcessor):
if self.delete:
pathfmt.set_extension(self.extension)
def run(self, pathfmt):
def convert(self, pathfmt):
if not self._frames:
return