Set max value for pre_capture (#8656)

This commit is contained in:
Nicolas Mowen
2023-11-18 14:37:06 -07:00
committed by GitHub
parent 977eef9138
commit 7d157dfeb0
3 changed files with 9 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ from frigate.const import (
CACHE_DIR,
CACHE_SEGMENT_FORMAT,
DEFAULT_DB_PATH,
MAX_PRE_CAPTURE,
REGEX_CAMERA_NAME,
YAML_EXT,
)
@@ -232,7 +233,9 @@ class RetainConfig(FrigateBaseModel):
class EventsConfig(FrigateBaseModel):
pre_capture: int = Field(default=5, title="Seconds to retain before event starts.")
pre_capture: int = Field(
default=5, title="Seconds to retain before event starts.", le=MAX_PRE_CAPTURE
)
post_capture: int = Field(default=5, title="Seconds to retain after event ends.")
required_zones: List[str] = Field(
default_factory=list,