T-024: Position pro Buch (5 s-Takt/Pausen/Stop), Fortsetzen an letzter Stelle; App-Start lädt letztes Buch pausiert; audible last-heard als sync.json (T-030-Basis)

This commit is contained in:
2026-11-06 20:34:03 +01:00
parent ab1995c5f5
commit ed0ff900ca
3 changed files with 145 additions and 4 deletions

View File

@ -180,7 +180,18 @@ pub fn run() {
.setup(|app| {
app.state::<SharedDownloadMgr>()
.attach(app.handle().clone());
app.state::<SharedPlayer>().attach(app.handle().clone());
let p = app.state::<SharedPlayer>().inner().clone();
p.attach(app.handle().clone());
// Letztes Buch pausiert fortsetzen (T-024), sobald mpv bereit ist
std::thread::Builder::new()
.name("hoerwerk-resume".into())
.spawn(move || {
std::thread::sleep(std::time::Duration::from_millis(1200));
if let Ok(_st) = p.resume_last() {
// Events gehen live; UI sieht die Leiste über Snapshot
}
})
.expect("resume thread");
Ok(())
})
.invoke_handler(tauri::generate_handler![