created = self.create(soundfile, format)
if created or reset_metadata:
self.set_metadata(soundfile, format)
- if not soundfile.duration and os.path.exists(soundfile.get_format_path('ogg')):
+ if (force or not soundfile.duration) and os.path.exists(soundfile.get_format_path('ogg')):
cmd = ['soxi', '-D', soundfile.get_format_path('ogg')]
soundfile.duration = int(float(subprocess.check_output(cmd)))
soundfile.save()