mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-26 19:06:11 +01:00
only save events when a clip is created
This commit is contained in:
parent
1b5b02d286
commit
00c75e9f98
@ -172,6 +172,8 @@ class EventProcessor(threading.Thread):
|
||||
self.events_in_process[event_data['id']] = event_data
|
||||
|
||||
if event_type == 'end':
|
||||
if len(self.cached_clips) > 0 and not event_data['false_positive']:
|
||||
self.create_clip(camera, event_data, save_clips_config.pre_capture)
|
||||
Event.create(
|
||||
id=event_data['id'],
|
||||
label=event_data['label'],
|
||||
@ -183,9 +185,6 @@ class EventProcessor(threading.Thread):
|
||||
zones=list(event_data['entered_zones']),
|
||||
thumbnail=event_data['thumbnail']
|
||||
)
|
||||
|
||||
if len(self.cached_clips) > 0 and not event_data['false_positive']:
|
||||
self.create_clip(camera, event_data, save_clips_config.pre_capture)
|
||||
del self.events_in_process[event_data['id']]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user