mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Cleanup timeline entries (#8489)
This commit is contained in:
parent
89dd114da1
commit
a482160691
@ -102,5 +102,11 @@ class TimelineProcessor(threading.Thread):
|
|||||||
)[0]
|
)[0]
|
||||||
Timeline.insert(timeline_entry).execute()
|
Timeline.insert(timeline_entry).execute()
|
||||||
elif event_type == "end":
|
elif event_type == "end":
|
||||||
|
if event_data["has_clip"] or event_data["has_snapshot"]:
|
||||||
timeline_entry[Timeline.class_type] = "gone"
|
timeline_entry[Timeline.class_type] = "gone"
|
||||||
Timeline.insert(timeline_entry).execute()
|
Timeline.insert(timeline_entry).execute()
|
||||||
|
else:
|
||||||
|
# if event was not saved then the timeline entries should be deleted
|
||||||
|
Timeline.delete().where(
|
||||||
|
Timeline.source_id == event_data["id"]
|
||||||
|
).execute()
|
||||||
|
Loading…
Reference in New Issue
Block a user