mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-20 05:32:49 +03:00
fix mypy and add docstring
This commit is contained in:
@@ -226,6 +226,7 @@ class RecordConfig(FrigateBaseModel):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def event_post_capture(self) -> int:
|
def event_post_capture(self) -> int:
|
||||||
|
"""Largest post-capture window used to fetch candidate reviews."""
|
||||||
return max(
|
return max(
|
||||||
self.alerts.post_capture,
|
self.alerts.post_capture,
|
||||||
self.detections.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
|
# get all reviews whose post capture reaches the oldest cache file
|
||||||
# or with end_time None; shared across stream types
|
# or with end_time None; shared across stream types
|
||||||
if camera not in reviews_by_camera:
|
if camera not in reviews_by_camera:
|
||||||
camera_config = self.config.cameras.get(camera)
|
|
||||||
post_capture = (
|
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] = (
|
reviews_by_camera[camera] = (
|
||||||
ReviewSegment.select(
|
ReviewSegment.select(
|
||||||
|
|||||||
Reference in New Issue
Block a user