mirror of
https://github.com/ep1cman/unifi-protect-backup.git
synced 2025-12-05 23:53:30 +00:00
Fixed issue where duplicate events were being downloaded
Previously unifi would only end one update which contained the end time stamp so it was sufficient to check if it existed in the new event data. However, now it is possible to get update events after the end timestamp has been set. With this change we now look for when the event change data contains the end time stamp. So long as unifi does not change its mind about when an event ends, this should solve the issue.
This commit is contained in:
@@ -61,7 +61,7 @@ class EventListener:
|
||||
return
|
||||
if msg.new_obj.camera_id in self.ignore_cameras:
|
||||
return
|
||||
if msg.new_obj.end is None:
|
||||
if 'end' not in msg.changed_data:
|
||||
return
|
||||
if msg.new_obj.type not in [EventType.MOTION, EventType.SMART_DETECT, EventType.RING]:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user