+ def get_duration(self, input_path):
+ d = get_duration(input_path)
+ if self.intro_flac:
+ d += get_duration(self.intro_flac.path)
+ if self.outro_flac:
+ d += get_duration(self.outro_flac.path)
+ return d
+
+ def prepare_audio(self, input_path):
+ files = []
+ if self.intro_flac:
+ files.append(standardize_audio(self.intro_flac.path))
+ files.append(standardize_audio(input_path, cache=False))
+ if self.outro_flac:
+ files.append(standardize_audio(self.outro_flac.path))
+ output = concat_audio(files)
+ for d in files:
+ unlink(d)
+ return output
+
+