NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
assumption on empty
Josh Hawkins139664e5987c
diff --git a/frigate/record/maintainer.py b/frigate/record/maintainer.pyindex 7cc715afdd..e0837b6920 100644--- a/frigate/record/maintainer.py+++ b/frigate/record/maintainer.py@@ -265,9 +265,11 @@ class RecordingMaintainer(threading.Thread):self.end_time_cache.pop(cache_path, None)# else retain days includes this segmentelse:- most_recently_processed_frame_time = self.object_recordings_info[camera][- -1- ][0]+ # assume that empty means the relevant recording info has not been received yet+ camera_info = self.object_recordings_info[camera]+ most_recently_processed_frame_time = (+ camera_info[-1][0] if len(camera_info) > 0 else 0+ )# ensure delayed segment info does not lead to lost segmentsif most_recently_processed_frame_time >= end_time.timestamp():