diff --git a/backend/config_parser.py b/backend/config_parser.py index 1e39752..29cfaaf 100644 --- a/backend/config_parser.py +++ b/backend/config_parser.py @@ -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: