forked from Github/frigate
Prevent recordings from being turned on if disabled in config (#6444)
* Prevent enabling recordings if not enabled in config * Fix conflict * Fix spacing * Update wording * Update wording --------- Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
This commit is contained in:
@@ -172,6 +172,9 @@ class RecordConfig(FrigateBaseModel):
|
||||
events: EventsConfig = Field(
|
||||
default_factory=EventsConfig, title="Event specific settings."
|
||||
)
|
||||
enabled_in_config: Optional[bool] = Field(
|
||||
title="Keep track of original state of recording."
|
||||
)
|
||||
|
||||
|
||||
class MotionConfig(FrigateBaseModel):
|
||||
@@ -952,6 +955,9 @@ class FrigateConfig(FrigateBaseModel):
|
||||
for input in camera_config.ffmpeg.inputs:
|
||||
input.path = input.path.format(**FRIGATE_ENV_VARS)
|
||||
|
||||
# set config recording value
|
||||
camera_config.record.enabled_in_config = camera_config.record.enabled
|
||||
|
||||
# Add default filters
|
||||
object_keys = camera_config.objects.track
|
||||
if camera_config.objects.filters is None:
|
||||
|
||||
Reference in New Issue
Block a user