Fix infinite review items when record is disabled

This commit is contained in:
Nicolas Mowen 2024-05-17 06:50:19 -06:00
parent ba03d3b3e4
commit a8376922f9

View File

@ -441,11 +441,14 @@ class ReviewSegmentMaintainer(threading.Thread):
if camera not in self.indefinite_events: if camera not in self.indefinite_events:
self.indefinite_events[camera] = {} self.indefinite_events[camera] = {}
if not self.config.cameras[camera].record.enabled:
continue
current_segment = self.active_review_segments.get(camera) current_segment = self.active_review_segments.get(camera)
if not self.config.cameras[camera].record.enabled:
if current_segment:
self.update_existing_segment(current_segment, frame_time, [])
continue
if current_segment is not None: if current_segment is not None:
if topic == DetectionTypeEnum.video: if topic == DetectionTypeEnum.video:
self.update_existing_segment( self.update_existing_segment(