feat: make file watcher, thumbnails, and upload library-aware

`watch_files` and `create_thumbnails` now iterate every configured
library, tagging rows with the correct `library_id`. `process_new_files`
takes a `&Library` so InsertImageExif no longer hardcodes the primary
library. Upload accepts an optional `library` query param to pick a
target library; omitted still defaults to primary for backwards
compatibility.

Hash-keyed thumbnail/HLS storage with dual-lookup fallback is deferred
to Phase 5, where it's bundled with the content hash backfill that
actually makes the hash-keyed paths meaningful. Until hashes are
populated, the legacy mirrored layout is a no-op to change.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
CameronandClaude Opus 4.7 authored and cameron committed 2026-04-21 01:55:07 +00:00
1 parent 48e5de6eab
commit ce5b337582
3 files changed
+164 -113

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ pub use state::AppState;
use std::path::Path;
use walkdir::DirEntry;
pub fn create_thumbnails() {
pub fn create_thumbnails(_libs: &[libraries::Library]) {
// Stub - implemented in main.rs
}