From a3cf40b908dbad55c50b3ea5df6a512d8da26f70 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 17 Oct 2024 08:04:44 -0600 Subject: [PATCH] Fix access --- frigate/ptz/autotrack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frigate/ptz/autotrack.py b/frigate/ptz/autotrack.py index fd9933bcb..9e19c9f51 100644 --- a/frigate/ptz/autotrack.py +++ b/frigate/ptz/autotrack.py @@ -1192,7 +1192,7 @@ class PtzAutoTracker: def autotracked_object_region(self, camera): return self.tracked_object[camera]["region"] - def autotrack_object(self, camera, obj): + def autotrack_object(self, camera: str, obj): camera_config = self.config.cameras[camera] if camera_config.onvif.autotracking.enabled: @@ -1208,7 +1208,7 @@ class PtzAutoTracker: if ( # new object self.tracked_object[camera] is None - and obj.camera == camera + and obj.camera_config.name == camera and obj.obj_data["label"] in self.object_types[camera] and set(obj.entered_zones) & set(self.required_zones[camera]) and not obj.previous["false_positive"]