|
|
@ -301,6 +301,8 @@ class TranscodeTools: |
|
|
|
async for chunk in nvr.stream_file(file, preview_pre_bytes): |
|
|
|
await raw.write(chunk) |
|
|
|
except asyncio.TimeoutError as te: |
|
|
|
idx = self.preview_storage.index(preview_file) |
|
|
|
del self.preview_storage[idx] |
|
|
|
self.logger.info(f"Cancel download file: {te}") |
|
|
|
os.remove(raw_file) |
|
|
|
finally: |
|
|
|