From 62728ef7fb6c4c2bf199175f21c9796fadb027e6 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Thu, 3 Dec 2020 08:02:04 -0600 Subject: [PATCH] default save_clips objects --- frigate/config.py | 2 +- frigate/events.py | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/frigate/config.py b/frigate/config.py index 56cdffa43..4bd74411a 100644 --- a/frigate/config.py +++ b/frigate/config.py @@ -459,7 +459,7 @@ class CameraSaveClipsConfig(): def __init__(self, global_config, config): self._enabled = config['enabled'] self._pre_capture = config['pre_capture'] - self._objects = config.get('objects') + self._objects = config.get('objects', global_config['objects']['track']) self._retain = SaveClipsRetainConfig(global_config['save_clips']['retain'], config['retain']) @property diff --git a/frigate/events.py b/frigate/events.py index 91429c9d4..e9a8683c3 100644 --- a/frigate/events.py +++ b/frigate/events.py @@ -170,12 +170,10 @@ class EventProcessor(threading.Thread): continue # if specific objects are listed for this camera, only save clips for them - # TODO: default to all tracked objects rather than checking for None - if save_clips_config.objects: - if not event_data['label'] in save_clips_config.objects: - if event_type == 'end': - self.event_processed_queue.put((event_data['id'], camera)) - continue + if not event_data['label'] in save_clips_config.objects: + if event_type == 'end': + self.event_processed_queue.put((event_data['id'], camera)) + continue if event_type == 'start': self.events_in_process[event_data['id']] = event_data