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:
Cameron
2026-04-17 15:41:38 -04:00
parent 08ac9a7695
commit 561e261d39
3 changed files with 164 additions and 113 deletions

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
}