Mulimage 2.0 #1

Merged
dtoro merged 64 commits from new into main 2026-05-21 22:48:55 +02:00
Showing only changes of commit 8083328f2d - Show all commits

View File

@@ -97,8 +97,20 @@ export function filtersToQ(f: FilterState = filters): string {
// express "exact root match" (path:"" / path:/ both fall back to "no
// filter"), so we leave the server query unfiltered and let the
// timeline post-filter to `Path === ''` client-side.
//
// For any non-root folder we want EVERY photo under that subtree, not
// just photos whose `photo_path` is an exact match. PhotoPrism's
// `path:` operator is exact-by-default but supports a trailing `*`
// wildcard:
// path:"2024" → matches only photos directly at `2024/` (none,
// if all files live in date-stamped sub-folders)
// path:"2024*" → matches `2024`, `2024/01`, `2024/02/...`, etc.
// path:"2024/01*" → matches `2024/01` plus descendants — still
// correct for a leaf folder.
// Always append `*` so internal tree nodes return the union of all
// descendant photos and leaves keep returning their direct contents.
if (f.folderPath && f.folderPath !== '/') {
parts.push(`path:${quoteIfNeeded(f.folderPath)}`);
parts.push(`path:${quoteIfNeeded(f.folderPath + '*')}`);
}
if (f.search) parts.push(quoteIfNeeded(f.search));
return parts.join(' ');