Fixes: Buchende-Position → Start von vorn (EOF-Idle-Bug: 'nichts abspielbar'), lokale Covers über Asset-URI, Test-Env-Races entfernt

This commit is contained in:
2026-11-06 21:10:17 +01:00
parent 51ad41ec34
commit 0e43e37cc3
4 changed files with 38 additions and 29 deletions

View File

@ -255,13 +255,19 @@ pub fn local_books() -> Vec<Book> {
.unwrap_or("?")
.to_string();
let (title, authors, runtime_min) = probe_m4b(&m4b);
let cover_file = book_dir.join("cover.jpg");
let cover_url = if cover_file.is_file() {
cover_file.to_string_lossy().to_string()
} else {
String::new()
};
out.push(Book {
asin: asin.clone(),
title: if title.is_empty() { format!("Unbekannt ({asin})") } else { title },
authors,
narrators: String::new(),
runtime_length_min: runtime_min.max(0),
cover_url: String::new(),
cover_url,
percent_complete: 0.0,
is_finished: false,
date_added: String::new(),