mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-20 13:54:36 +01:00
Quick fix (#16926)
* fix * Fix * Fix incorrect default websocket value * Cleanup value setting
This commit is contained in:
@@ -707,16 +707,14 @@ class TrackedObjectProcessor(threading.Thread):
|
||||
|
||||
def _get_enabled_state(self, camera: str) -> bool:
|
||||
_, config_data = self.enabled_subscribers[camera].check_for_update()
|
||||
|
||||
if config_data:
|
||||
enabled = config_data.enabled
|
||||
self.config.cameras[camera].enabled = config_data.enabled
|
||||
|
||||
if self.camera_states[camera].prev_enabled is None:
|
||||
self.camera_states[camera].prev_enabled = enabled
|
||||
return enabled
|
||||
return (
|
||||
self.camera_states[camera].prev_enabled
|
||||
if self.camera_states[camera].prev_enabled is not None
|
||||
else self.config.cameras[camera].enabled
|
||||
)
|
||||
self.camera_states[camera].prev_enabled = config_data.enabled
|
||||
|
||||
return self.config.cameras[camera].enabled
|
||||
|
||||
def run(self):
|
||||
while not self.stop_event.is_set():
|
||||
|
||||
Reference in New Issue
Block a user