From 3d600e14eab810a86b3134a800b7919e001d891a Mon Sep 17 00:00:00 2001 From: gsd Date: Sun, 1 Sep 2024 21:47:53 +0300 Subject: [PATCH] preview load timeout fix --- backend/config_parser.py | 2 ++ 1 file changed, 2 insertions(+) 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: