- +1 minor fix

This commit is contained in:
Dmytro Bogovych 2023-08-22 15:23:09 +03:00
parent 38df4a6209
commit 4bf2282f18
1 changed files with 7 additions and 7 deletions

View File

@ -114,7 +114,7 @@ def upload_results():
# Path to audio
path_audio = t[1]
print(f'Found {path_report.name} and {path_audio.name} files.')
utils.log(f'Found {path_report.name} and {path_audio.name} files.')
try:
with open(path_report, 'rt') as f:
report = json.loads(f.read())
@ -127,12 +127,12 @@ def upload_results():
utils.log(f'Report {upload_id} is uploaded ok.')
# Rename files to make sync audio filename with reported ones
path_report_fixed = CACHE.dir / f'{upload_id}.json'
path_report = path_report.rename(path_report_fixed)
# path_report_fixed = CACHE.dir / f'{upload_id}.json'
# path_report = path_report.rename(path_report_fixed)
path_audio_fixed = CACHE.dir / f'{upload_id}.wav'
path_audio = path_audio.rename(path_audio_fixed)
utils.log(f'Uploading {path_report.name} and {path_audio.name} files...')
# path_audio_fixed = CACHE.dir / f'{upload_id}.wav'
# path_audio = path_audio.rename(path_audio_fixed)
utils.log(f'Uploading {path_audio.name} file...')
# Upload recorded audio
upload_result = BackendServer.upload_audio(upload_id, path_audio)
if upload_result: