mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-19 21:22:50 +03:00
fix mypy and add docstring
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user