UI: Toolbar als Symbol-Buttons (nur-lokal, Auffrischen, Zahnrad), Einstellungen erweitert (Genre-Schlagwörter, Alter-Vorschläge, persistiert in settings.json)

This commit is contained in:
2026-11-09 11:22:30 +01:00
parent 872b46d4ca
commit 30d6da141b
7 changed files with 146 additions and 11 deletions

View File

@ -176,6 +176,20 @@ async fn book_series_bulk(refresh: bool) -> Result<BTreeMap<String, audible::Ser
.map_err(|e| format!("Hintergrundthread fehlgeschlagen: {e}"))?
}
#[tauri::command]
async fn get_prefs() -> Result<audible::Prefs, String> {
tauri::async_runtime::spawn_blocking(audible::prefs_load)
.await
.map_err(|e| format!("Hintergrundthread fehlgeschlagen: {e}"))
}
#[tauri::command]
async fn set_prefs(prefs: audible::Prefs) -> Result<(), String> {
tauri::async_runtime::spawn_blocking(move || audible::prefs_save(&prefs))
.await
.map_err(|e| format!("Hintergrundthread fehlgeschlagen: {e}"))?
}
/// Einzeldetails (Beschreibung u. a.) per Audible-API, on demand.
#[tauri::command]
async fn book_details(asin: String) -> Result<audible::BookExtra, String> {
@ -302,6 +316,8 @@ pub fn run() {
get_library,
get_local_books,
book_series_bulk,
get_prefs,
set_prefs,
book_details,
stream_only,
get_alter_notes,