From: Guillaume Pellerin Date: Tue, 24 Dec 2024 12:01:57 +0000 (+0100) Subject: better log touching X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=6d3b96867bb153415ee6522900f202fa79eaac0c;p=telecaster-server.git better log touching --- diff --git a/bin/mastering/mastering.py b/bin/mastering/mastering.py index a62909b..e2b0e72 100755 --- a/bin/mastering/mastering.py +++ b/bin/mastering/mastering.py @@ -129,17 +129,18 @@ class TeleCasterMastering(object): self.logger.logger.info(command) os.system(command) - def touch_file(self, path): - file = open(path, 'w') + def touch(self, file): + file = open(file, 'w') file.close() def remux(self, file): log = file + '.log' if os.path.getsize(file) and not os.path.exists(log): self.double_remux(file) - self.touch_file(log) + self.touch(log) def transcode(self, file, offset=None): + log = file + '.log' filename, ext = os.path.splitext(file) for dest_format in self.dest_formats: ffmpeg_args = self.dest_formats[dest_format] @@ -160,6 +161,8 @@ class TeleCasterMastering(object): if not self.dry_run_mode: os.system(command) + self.touch(log) + def is_processed(self, source_files): processed = False for file in source_files: