From 08586f8f65842c9018d7185c3606cbce7095832f Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sun, 24 Sep 2023 04:05:29 -0600 Subject: [PATCH] Fix case where camera is disabled but autotrack is enabled (#7914) --- frigate/ptz/autotrack.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frigate/ptz/autotrack.py b/frigate/ptz/autotrack.py index 935d49250a..6c9db67c03 100644 --- a/frigate/ptz/autotrack.py +++ b/frigate/ptz/autotrack.py @@ -121,6 +121,9 @@ def __init__( def run(self): while not self.stop_event.wait(1): for camera_name, cam in self.config.cameras.items(): + if not cam.enabled: + continue + if cam.onvif.autotracking.enabled: self.ptz_autotracker.camera_maintenance(camera_name) else: @@ -153,6 +156,9 @@ def __init__( # if cam is set to autotrack, onvif should be set up for camera_name, cam in self.config.cameras.items(): + if not cam.enabled: + continue + self.autotracker_init[camera_name] = False if cam.onvif.autotracking.enabled: self._autotracker_setup(cam, camera_name)