mirror of
https://github.com/ep1cman/unifi-protect-backup.git
synced 2025-12-05 23:53:30 +00:00
Skip unwanted event types
e.g DISCONNECT events never have video associated with them, skip processing if we encounter events of types we are not interested in. Co-authored-by: Sebastian Goscik <sebastian.goscik@live.co.uk>
This commit is contained in:
committed by
Sebastian Goscik
parent
af8ca90356
commit
f2c9ee5c76
@@ -425,6 +425,8 @@ class UnifiProtectBackup:
|
||||
return
|
||||
if msg.new_obj.end is None:
|
||||
return
|
||||
if msg.new_obj.type not in [EventType.MOTION, EventType.SMART_DETECT, EventType.RING]:
|
||||
return
|
||||
if msg.new_obj.type is EventType.MOTION and "motion" not in self.detection_types:
|
||||
logger.extra_debug(f"Skipping unwanted motion detection event: {msg.new_obj.id}") # type: ignore
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user