From 6ab6f1be9fe7fd05bf07d6e5443d56184302726a Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 19 Oct 2026 13:17:53 -0500 Subject: [PATCH] fix mypy and add docstring --- frigate/config/camera/record.py | 1 + frigate/record/maintainer.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frigate/config/camera/record.py b/frigate/config/camera/record.py index 8d6980942c..ebb51d5b37 100644 --- a/frigate/config/camera/record.py +++ b/frigate/config/camera/record.py @@ -226,6 +226,7 @@ class RecordConfig(FrigateBaseModel): @property def event_post_capture(self) -> int: + """Largest post-capture window used to fetch candidate reviews.""" return max( self.alerts.post_capture, self.detections.post_capture, diff --git a/frigate/record/maintainer.py b/frigate/record/maintainer.py index 8a5a3cc236..4bcf8a4b48 100644 --- a/frigate/record/maintainer.py +++ b/frigate/record/maintainer.py @@ -474,9 +474,10 @@ class RecordingMaintainer(threading.Thread): # get all reviews whose post capture reaches the oldest cache file # or with end_time None; shared across stream types if camera not in reviews_by_camera: - camera_config = self.config.cameras.get(camera) post_capture = ( - camera_config.record.event_post_capture if camera_config else 0 + self.config.cameras[camera].record.event_post_capture + if camera in self.config.cameras + else 0 ) reviews_by_camera[camera] = ( ReviewSegment.select(