Add in progress events to recordings view

This commit is contained in:
Jason Hunter
2022-02-08 19:17:42 -05:00
committed by Blake Blackshear
parent 3189467a36
commit e433bec17f
2 changed files with 35 additions and 20 deletions

View File

@@ -524,12 +524,17 @@ def recordings(camera_name):
FROM C2
WHERE cnt = 0
)
SELECT id, label, camera, top_score, start_time, end_time
FROM event
WHERE camera = ? AND end_time IS NULL
UNION ALL
SELECT MIN(id) as id, label, camera, MAX(top_score) as top_score, MIN(ts) AS start_time, max(ts) AS end_time
FROM C3
GROUP BY label, grpnum
ORDER BY start_time;""",
camera_name,
camera_name,
camera_name,
)
event: Event