Commit 6f1ae67f authored by fred's avatar fred

create-sound-files: extend copy to all source formats

parent 3412cfde
......@@ -40,7 +40,7 @@ class Command(BaseCommand):
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)
......@@ -76,10 +76,11 @@ class Command(BaseCommand):
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'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment