mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-07 11:21:11 +03:00
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:
co-authored by
Blake Blackshear
parent
305323c9e9
commit
5951a740d2
@@ -180,6 +180,12 @@ class Dispatcher:
|
||||
record_settings = self.config.cameras[camera_name].record
|
||||
|
||||
if payload == "ON":
|
||||
if not self.config.cameras[camera_name].record.enabled_in_config:
|
||||
logger.error(
|
||||
f"Recordings must be enabled in the config to be turned on via MQTT."
|
||||
)
|
||||
return
|
||||
|
||||
if not record_settings.enabled:
|
||||
logger.info(f"Turning on recordings for {camera_name}")
|
||||
record_settings.enabled = True
|
||||
|
||||
Reference in New Issue
Block a user