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

@ -356,10 +356,16 @@ impl Player for MpvPlayer {
}))?;
std::thread::sleep(Duration::from_millis(300));
// Fortsetzen: lokal gespeicherte Position, sonst Audible-Sync (T-030)
let start = match positions_load().get(asin) {
let mut start = match positions_load().get(asin) {
Some(e) => e.pos,
None => audible_sync_pos(&books_dir().join(asin)).unwrap_or(0.0),
};
// Nahe am Buchende → von vorn (sonst EOF → sofort idle, T-024-Edge)
if let Some(dur) = self.get_f64("duration") {
if dur > 5.0 && start >= dur - 2.0 {
start = 0.0;
}
}
if start > 1.0 {
let _ = self.set_position(start);
}