Improve review segmentation behavior (#19850)

* Refactor active objects to class

* Keep segment going when detection is newer than end of alert

* Cleanup logic

* Fix

* Cleanup ending

* Adjust timing

* Improve detection saving

* Don't have padding at end for in progress reviews

* Add review config for cutoff times
This commit is contained in:
Nicolas Mowen
2025-08-31 16:36:12 -05:00
committed by GitHub
parent a478c38f8a
commit 3a1e1d0841
4 changed files with 242 additions and 145 deletions
+8
View File
@@ -26,6 +26,10 @@ class AlertsConfig(FrigateBaseModel):
enabled_in_config: Optional[bool] = Field(
default=None, title="Keep track of original state of alerts."
)
cutoff_time: int = Field(
default=40,
title="Time to cutoff alerts after no alert-causing activity has occurred.",
)
@field_validator("required_zones", mode="before")
@classmethod
@@ -48,6 +52,10 @@ class DetectionsConfig(FrigateBaseModel):
default_factory=list,
title="List of required zones to be entered in order to save the event as a detection.",
)
cutoff_time: int = Field(
default=30,
title="Time to cutoff detection after no detection-causing activity has occurred.",
)
enabled_in_config: Optional[bool] = Field(
default=None, title="Keep track of original state of detections."