NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Fix preview failing on cameras with - in name (#12093)
Nicolas Mowen3410290b45e8
diff --git a/frigate/output/preview.py b/frigate/output/preview.pyindex b47a5c3022..b7330bc7f8 100644--- a/frigate/output/preview.py+++ b/frigate/output/preview.py@@ -219,12 +219,15 @@ class PreviewRecorder:os.unlink(os.path.join(PREVIEW_CACHE_DIR, file))continue- file_time = file.split("-")[1][: -(len(PREVIEW_FRAME_TYPE) + 1)]+ try:+ file_time = file.split("-")[-1][: -(len(PREVIEW_FRAME_TYPE) + 1)]- if not file_time:- continue+ if not file_time:+ continue- ts = float(file_time)+ ts = float(file_time)+ except ValueError:+ continueif self.start_time == 0:self.start_time = ts