T-013: 'Löschen' für geladene/fehlerhafte Jobs (Verzeichnis+Queue-Eintrag), Worker-Guards gegen Löschung während laufendem Download

This commit is contained in:
2026-11-06 19:58:56 +01:00
parent 7095f06873
commit 255a0372ca
4 changed files with 76 additions and 23 deletions

View File

@ -36,6 +36,11 @@ fn download_cancel(dl: tauri::State<SharedDownloadMgr>, asin: String) -> Result<
dl.cancel(&asin)
}
#[tauri::command]
fn download_delete(dl: tauri::State<SharedDownloadMgr>, asin: String) -> Result<(), String> {
dl.delete(&asin)
}
/// Bibliothek laden: externer CLI-Export dauert (Netzwerk) — läuft deshalb
/// auf einem Blocking-Thread, damit die UI nicht friert.
#[tauri::command]
@ -65,7 +70,8 @@ pub fn run() {
get_library,
download_list,
download_enqueue,
download_cancel
download_cancel,
download_delete
])
.run(tauri::generate_context!())
.expect("error while running tauri application");