From 3d419a39a82161f747bbb051b295c41c766fd1c3 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Wed, 8 Jan 2020 06:40:40 -0600 Subject: [PATCH] fix object filters --- frigate/video.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frigate/video.py b/frigate/video.py index 95f02b3ed..99bd59c26 100644 --- a/frigate/video.py +++ b/frigate/video.py @@ -187,9 +187,12 @@ class Camera: self.objects_to_track = set().union(global_objects_config.get('track', ['person', 'car', 'truck']), camera_objects_config.get('track', [])) # merge object filters - objects_with_config = set().union(global_objects_config.get('filters', {}).keys(), camera_objects_config.get('filters', {}).keys()) + global_object_filters = global_objects_config.get('filters', {}) + camera_object_filters = camera_objects_config.get('filters', {}) + objects_with_config = set().union(global_object_filters.keys(), camera_object_filters.keys()) + self.object_filters = {} for obj in objects_with_config: - self.object_filters = {**global_objects_config.get(obj, {}), **camera_objects_config.get(obj, {})} + self.object_filters[obj] = {**global_object_filters.get(obj, {}), **camera_object_filters.get(obj, {})} # start a thread to queue resize requests for regions self.region_requester = RegionRequester(self)