mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 11:12:35 +02:00
scan_timelapse's Strategy 2 matched filename timestamps against both archive.started_at and archive.completed_at across seven hypothesised tz offsets. The filename is always print-START time, so the end-time branch was a semantic mistake — and the dense offset set [0, +-1, +-7, +-8] let an unrelated video coincidentally land within minutes of any later archive at some offset. Extract Strategy 2 into _match_timelapse_by_timestamp(): compare only against start time, and refuse to auto-pick when the next-best different video is within a 15-minute ambiguity margin. The route then returns available_files and the frontend's existing manual-selection dialog takes over — which is the fallback the reporter explicitly asked for. Surfaces in LAN-Only mode where the printer can't reach NTP and its clock drifts (e.g. P2S filenames in CST while server is in UTC, the 8h offset that exposed this bug).