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