fix: clear thumbnail cache and temp dirs on new session

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-21 11:18:14 -04:00
parent ab053edd14
commit 8013ef7c55
6 changed files with 39 additions and 0 deletions

View File

@@ -35,3 +35,10 @@ pub async fn extract_thumbnails(
.await
.map_err(|e| format!("Task failed: {e}"))?
}
#[tauri::command]
pub async fn cleanup_thumbnails(paths: Vec<String>) -> Result<(), String> {
tokio::task::spawn_blocking(move || thumbnail_extractor::cleanup_thumbnail_dirs(&paths))
.await
.map_err(|e| format!("Task failed: {e}"))?
}