|
|
@ -334,9 +334,9 @@ class TranscodeTools: |
|
|
|
async with aiofiles.open(raw_file, "wb") as raw: |
|
|
|
async for chunk in nvr.stream_file(file, preview_pre_bytes): |
|
|
|
await raw.write(chunk) |
|
|
|
await asyncio.wait_for(download_task(), 10) |
|
|
|
await download_task() |
|
|
|
|
|
|
|
except asyncio.TimeoutError as te: |
|
|
|
except Exception as te: |
|
|
|
clear_from_storage() |
|
|
|
self.logger.info(f"Cancel download file: {te}") |
|
|
|
if os.path.exists(raw_file): |
|
|
|