Detect motion events per camera #111
Loading…
Reference in a new issue
No description provided.
Delete branch "refs/pull/111/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motion snapshots from all cameras were grouped into events as one chronologically-sorted stream, so motion on two cameras within 60 seconds merged into a single event attributed to the first camera. This adds group_events_per_camera() — partition by camera, group per camera, merge sorted by start time — and swaps both call sites in the web routes.
The day view now shows simultaneous events side by side with correct camera names, thumbnails, and links; the calendar counts every camera's events.
Closes #110
src/cang/web/routes/clips.py🔴 Declining — the logic change lives entirely in
group_events_per_camerainsrc/cang/events.py, which has 5 dedicated unit tests covering the core bug scenario, simultaneous events, single-camera parity, and chronological ordering. The two call-site changes inclips.pyare mechanical one-word swaps with no new branching or routing logic, so endpoint-level integration tests would duplicate coverage rather than add it.