action='store_true',
dest='copy',
default=False,
- help='Copy initial file (ogg only)')
+ help='Copy initial file')
def handle(self, force, reset_metadata, copy, emission, episode, verbosity, **kwargs):
self.verbose = (verbosity > 1)
cmd = ['ffmpeg', '-y', '-i', soundfile.file.path]
+ if self.copy and os.path.splitext(soundfile.file.path)[-1].strip('.') == format:
+ shutil.copy(soundfile.file.path, file_path)
+ return
+
if format == 'ogg':
- if self.copy:
- shutil.copy(soundfile.file.path, file_path)
- return
cmd.extend(['-q:a', '5'])
elif format == 'mp3':
cmd.extend(['-q:a', '4'])