]> git.parisson.com Git - telecaster-server.git/commitdiff
better log touching
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Tue, 24 Dec 2024 12:01:57 +0000 (13:01 +0100)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Tue, 24 Dec 2024 12:01:57 +0000 (13:01 +0100)
bin/mastering/mastering.py

index a62909b6d095d67ddaedcbde2ed4d1a17fff6766..e2b0e72e457da1908214f38f679c8c0adf086b8b 100755 (executable)
@@ -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: