mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-03 06:50:58 +00:00
Compare commits
No commits in common. "545ad810593477cdae2ae4c8f61054a983ee9761" and "baac31b556fa3770cb42601e7cabddc06dee93f1" have entirely different histories.
545ad81059
...
baac31b556
@ -33,7 +33,7 @@ class RetainModeEnum(str, Enum):
|
||||
|
||||
|
||||
class ReviewRetainConfig(FrigateBaseModel):
|
||||
days: float = Field(default=10, ge=0, title="Default retention period.")
|
||||
days: float = Field(default=10, ge=10, title="Default retention period.")
|
||||
mode: RetainModeEnum = Field(default=RetainModeEnum.motion, title="Retain mode.")
|
||||
|
||||
|
||||
|
||||
@ -264,9 +264,7 @@ class RecordingCleanup(threading.Thread):
|
||||
logger.debug("Start deleted cameras.")
|
||||
|
||||
# Handle deleted cameras
|
||||
expire_days = max(
|
||||
self.config.record.continuous.days, self.config.record.motion.days
|
||||
)
|
||||
expire_days = self.config.record.retain.days
|
||||
expire_before = (
|
||||
datetime.datetime.now() - datetime.timedelta(days=expire_days)
|
||||
).timestamp()
|
||||
|
||||
@ -368,8 +368,7 @@ def migrate_017_0(config: dict[str, dict[str, Any]]) -> dict[str, dict[str, Any]
|
||||
|
||||
new_config["record"]["continuous"] = continuous
|
||||
new_config["record"]["motion"] = motion
|
||||
|
||||
del new_config["record"]["retain"]
|
||||
del new_config["record"]["retain"]
|
||||
|
||||
for name, camera in config.get("cameras", {}).items():
|
||||
camera_config: dict[str, dict[str, Any]] = camera.copy()
|
||||
@ -389,8 +388,7 @@ def migrate_017_0(config: dict[str, dict[str, Any]]) -> dict[str, dict[str, Any]
|
||||
|
||||
camera_config["record"]["continuous"] = continuous
|
||||
camera_config["record"]["motion"] = motion
|
||||
|
||||
del camera_config["record"]["retain"]
|
||||
del camera_config["record"]["retain"]
|
||||
|
||||
new_config["cameras"][name] = camera_config
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user