Altersangaben: Genre-Signal-Chip (Kinder/Jugend aus Audible-Genres) + manuelle Altersnote pro Buch (labels.json, Inline-Edit mit Stift-Button)

This commit is contained in:
2026-11-06 20:20:51 +01:00
parent 14b93e2fb1
commit 0b7e223ad5
7 changed files with 162 additions and 2 deletions

View File

@ -68,6 +68,23 @@ async fn stream_only() -> Result<Vec<String>, String> {
.await
.map_err(|e| format!("Hintergrundthread fehlgeschlagen: {e}"))
}
#[tauri::command]
async fn get_alter_notes() -> Result<audible::Labels, String> {
tauri::async_runtime::spawn_blocking(audible::alter_notes)
.await
.map_err(|e| format!("Hintergrundthread fehlgeschlagen: {e}"))
}
#[tauri::command]
async fn set_alter_note(
asin: String,
note: Option<String>,
) -> Result<(), String> {
tauri::async_runtime::spawn_blocking(move || audible::set_alter_note(&asin, note))
.await
.map_err(|e| format!("Hintergrundthread fehlgeschlagen: {e}"))?
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
@ -86,6 +103,8 @@ pub fn run() {
get_library,
get_local_books,
stream_only,
get_alter_notes,
set_alter_note,
download_list,
download_enqueue,
download_cancel,