Frame counter should be initialized on all importers

Fixes #2150
This commit is contained in:
Alexandre Lissy 2019-06-09 07:43:56 +02:00
Родитель 9224d4de2b
Коммит f33ead8af9
2 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -91,6 +91,7 @@ def _maybe_convert_sets(target_dir, extracted_data):
wav_filename = path.splitext(ogg_filename)[0] + ".wav"
_maybe_convert_wav(ogg_filename, wav_filename)
file_size = -1
frames = 0
if path.exists(wav_filename):
file_size = path.getsize(wav_filename)
frames = int(subprocess.check_output(['soxi', '-s', wav_filename], stderr=subprocess.STDOUT))

Просмотреть файл

@ -89,6 +89,7 @@ def _maybe_convert_sets(target_dir, extracted_data, english_compatible=False):
wav_filename = path.splitext(orig_filename)[0] + ".converted.wav"
_maybe_convert_wav(orig_filename, wav_filename)
file_size = -1
frames = 0
if path.exists(wav_filename):
file_size = path.getsize(wav_filename)
frames = int(subprocess.check_output(['soxi', '-s', wav_filename], stderr=subprocess.STDOUT))