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:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user