mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-02-14 00:17:05 +01:00
assumption on empty
This commit is contained in:
parent
441c605312
commit
139664e598
@ -265,9 +265,11 @@ class RecordingMaintainer(threading.Thread):
|
|||||||
self.end_time_cache.pop(cache_path, None)
|
self.end_time_cache.pop(cache_path, None)
|
||||||
# else retain days includes this segment
|
# else retain days includes this segment
|
||||||
else:
|
else:
|
||||||
most_recently_processed_frame_time = self.object_recordings_info[camera][
|
# assume that empty means the relevant recording info has not been received yet
|
||||||
-1
|
camera_info = self.object_recordings_info[camera]
|
||||||
][0]
|
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 segments
|
# ensure delayed segment info does not lead to lost segments
|
||||||
if most_recently_processed_frame_time >= end_time.timestamp():
|
if most_recently_processed_frame_time >= end_time.timestamp():
|
||||||
|
Loading…
Reference in New Issue
Block a user