Support shallow Dahua folder layout #136

Manually merged
marvin8 merged 2 commits from fix/issue-135-shallow-dahua-layout into main 2026-08-12 03:20:27 +00:00
Collaborator

Some Dahua cameras use a shallower folder structure where .jpg files sit directly in jpg/HH/ instead of jpg/HH/MM/, and the filename encodes both minutes and seconds as MM.SS[flags] instead of just SS[flags].

This PR adds support for both layouts:

  • Deep (existing): jpg/HH/MM/SS[flags].jpg
  • Shallow (new): jpg/HH/MM.SS[flags].jpg

_parse_snapshot_time() detects the format from the filename (presence of a .), and _all_snapshots_in_channel() scans both the MM subdirectory tree and the HH directory for .jpg files.

Closes #135

Some Dahua cameras use a shallower folder structure where `.jpg` files sit directly in `jpg/HH/` instead of `jpg/HH/MM/`, and the filename encodes both minutes and seconds as `MM.SS[flags]` instead of just `SS[flags]`. This PR adds support for both layouts: - **Deep** (existing): `jpg/HH/MM/SS[flags].jpg` - **Shallow** (new): `jpg/HH/MM.SS[flags].jpg` `_parse_snapshot_time()` detects the format from the filename (presence of a `.`), and `_all_snapshots_in_channel()` scans both the MM subdirectory tree and the HH directory for `.jpg` files. Closes #135
🐛 Support shallow Dahua folder layout
Some checks failed
/ pr-review (pull_request) Has started running
/ gitleaks (pull_request) Failing after 34s
/ checks (pull_request) Failing after 36s
/ publish (pull_request) Has been skipped
/ deploy-docs (pull_request) Has been skipped
/ publish-container (pull_request) Has been skipped
f5bd276685
Some Dahua cameras use a shallower folder structure where
.jpg files sit directly in jpg/HH/ instead of jpg/HH/MM/,
and the filename encodes both minutes and seconds as
MM.SS[flags] instead of just SS[flags].

_parse_snapshot_time() now detects the shallow format by the
presence of a dot in the stem, reading minutes and seconds
from the filename. _all_snapshots_in_channel() additionally
scans for .jpg files directly in each HH directory as a
fallback after the deep MM/ iteration.

Closes #135
agent-pi force-pushed fix/issue-135-shallow-dahua-layout from f5bd276685
Some checks failed
/ pr-review (pull_request) Has started running
/ gitleaks (pull_request) Failing after 34s
/ checks (pull_request) Failing after 36s
/ publish (pull_request) Has been skipped
/ deploy-docs (pull_request) Has been skipped
/ publish-container (pull_request) Has been skipped
to 07756bd854
All checks were successful
/ gitleaks (pull_request) Successful in 17s
/ pr-review (pull_request) Successful in 38s
/ checks (pull_request) Successful in 1m45s
/ publish (pull_request) Has been skipped
/ deploy-docs (pull_request) Has been skipped
/ publish-container (pull_request) Has been skipped
2026-08-12 02:42:29 +00:00
Compare
📝 Document shallow Dahua folder layout in release notes and docs
All checks were successful
/ gitleaks (pull_request) Successful in 16s
/ pr-review (pull_request) Successful in 42s
/ checks (pull_request) Successful in 3m7s
/ publish (pull_request) Has been skipped
/ deploy-docs (pull_request) Has been skipped
/ publish-container (pull_request) Has been skipped
c7e24593d1
marvin8 approved these changes 2026-08-12 03:16:14 +00:00
marvin8 manually merged commit 44d4d8935b into main 2026-08-12 03:20:27 +00:00
marvin8 deleted branch fix/issue-135-shallow-dahua-layout 2026-08-12 03:20:43 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marvin8/cang!136
No description provided.