Skip to content

Commit

Permalink
Fix case where camera is disabled but autotrack is enabled (#7914)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Sep 24, 2023
1 parent cfd04d1 commit 08586f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frigate/ptz/autotrack.py
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 08586f8

Please sign in to comment.