feat: smart thumbnail cleanup and rename-aware file tracking
Delete thumbnails alongside DB rows in all three removal paths (watcher detect, delete-from-disk command, remove-folder command) so orphans no longer accumulate passively. Intercept RenameMode::Both watcher events and handle them as in-place path updates: renames the thumbnail file to the new hash and updates the DB row without touching the embedding, avoiding a full rebuild on move. Falls back to thumbnail regeneration if the file rename fails.
This commit is contained in:
@@ -74,7 +74,7 @@ pub fn run() {
|
||||
// indexer::start_caption_worker(app.handle().clone(), pool.clone(), app_dir.clone());
|
||||
indexer::start_tagging_worker(app.handle().clone(), pool.clone(), app_dir.clone());
|
||||
|
||||
let watcher_handle = indexer::start_watcher(app.handle().clone(), pool.clone());
|
||||
let watcher_handle = indexer::start_watcher(app.handle().clone(), pool.clone(), thumb_dir.clone());
|
||||
|
||||
app.manage(pool);
|
||||
app.manage(media_tools);
|
||||
|
||||
Reference in New Issue
Block a user