mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-02-14 00:17:05 +01:00
Fix case where camera is disabled but autotrack is enabled (#7914)
This commit is contained in:
parent
cfd04d164e
commit
08586f8f65
@ -121,6 +121,9 @@ class PtzAutoTrackerThread(threading.Thread):
|
|||||||
def run(self):
|
def run(self):
|
||||||
while not self.stop_event.wait(1):
|
while not self.stop_event.wait(1):
|
||||||
for camera_name, cam in self.config.cameras.items():
|
for camera_name, cam in self.config.cameras.items():
|
||||||
|
if not cam.enabled:
|
||||||
|
continue
|
||||||
|
|
||||||
if cam.onvif.autotracking.enabled:
|
if cam.onvif.autotracking.enabled:
|
||||||
self.ptz_autotracker.camera_maintenance(camera_name)
|
self.ptz_autotracker.camera_maintenance(camera_name)
|
||||||
else:
|
else:
|
||||||
@ -153,6 +156,9 @@ class PtzAutoTracker:
|
|||||||
|
|
||||||
# if cam is set to autotrack, onvif should be set up
|
# if cam is set to autotrack, onvif should be set up
|
||||||
for camera_name, cam in self.config.cameras.items():
|
for camera_name, cam in self.config.cameras.items():
|
||||||
|
if not cam.enabled:
|
||||||
|
continue
|
||||||
|
|
||||||
self.autotracker_init[camera_name] = False
|
self.autotracker_init[camera_name] = False
|
||||||
if cam.onvif.autotracking.enabled:
|
if cam.onvif.autotracking.enabled:
|
||||||
self._autotracker_setup(cam, camera_name)
|
self._autotracker_setup(cam, camera_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user