mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
ensure cache copies when events have ended
This commit is contained in:
parent
6832575643
commit
014e6fc909
@ -110,7 +110,7 @@ class RecordingMaintainer(threading.Thread):
|
|||||||
.where(
|
.where(
|
||||||
Event.camera == camera,
|
Event.camera == camera,
|
||||||
(Event.end_time == None)
|
(Event.end_time == None)
|
||||||
| (Event.end_time >= recordings[0]["start_time"]),
|
| (Event.end_time >= recordings[0]["start_time"].timestamp()),
|
||||||
Event.has_clip,
|
Event.has_clip,
|
||||||
)
|
)
|
||||||
.order_by(Event.start_time)
|
.order_by(Event.start_time)
|
||||||
@ -171,7 +171,10 @@ class RecordingMaintainer(threading.Thread):
|
|||||||
|
|
||||||
# if the event is in progress or ends after the recording starts, keep it
|
# if the event is in progress or ends after the recording starts, keep it
|
||||||
# and stop looking at events
|
# and stop looking at events
|
||||||
if event.end_time is None or event.end_time >= start_time:
|
if (
|
||||||
|
event.end_time is None
|
||||||
|
or event.end_time >= start_time.timestamp()
|
||||||
|
):
|
||||||
overlaps = True
|
overlaps = True
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user