From: Guillaume Pellerin Date: Tue, 24 Dec 2024 12:05:18 +0000 (+0100) Subject: even better loggin X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=b20d06f26e1eae57110ced455df5d3c810046792;p=telecaster-server.git even better loggin --- diff --git a/bin/mastering/mastering.py b/bin/mastering/mastering.py index e2b0e72..63862c2 100755 --- a/bin/mastering/mastering.py +++ b/bin/mastering/mastering.py @@ -99,6 +99,7 @@ class TeleCasterMastering(object): def find_best_offset(self, files): offsets = {} for file in files: + log = file + '.log' others = files.copy() others.remove(file) offsets[file] = {} @@ -108,6 +109,7 @@ class TeleCasterMastering(object): offset = self.get_offset(file, other) offsets[file]['offsets'][other] = offset offsets[file]['offsets_sum'] += offset + self.touch(log) # print(offsets) min_offset = sorted(offsets.items(), key=lambda x: x[1]['offsets_sum'])[0] @@ -178,6 +180,7 @@ class TeleCasterMastering(object): for dir in dirs: path = root + os.sep + dir print(path) + is_processed = self.is_processed(path) dir_files = os.listdir(path) source_files = [] for file in dir_files: @@ -190,8 +193,6 @@ class TeleCasterMastering(object): if source_files: offsets = {} - is_processed = self.is_processed(source_files) - if len(source_files) > 1 and self.auto_offset_mode and (not is_processed or self.force_mode): date_file = datetime.datetime.fromtimestamp(os.path.getmtime(source_files[0])) if date_file >= self.date_limit and self.date_filter: