Card-Play: load(paused)-Parameter (Loadfile erbt sonst Pause!), bereits geladen = nur entpausen; Standardfenster 1280×800 (min 1024×680)

This commit is contained in:
2026-11-09 17:37:30 +01:00
parent 5fb5ea27cd
commit 452e6557f1
6 changed files with 24 additions and 15 deletions

View File

@ -568,7 +568,12 @@
if (!isLocal(b)) return
error = ''
try {
player = await playerLoad(b.asin, b.title)
// Schon geladen? Nur entpausen — sonst laden und SOFORT abspielen.
if (player.loaded && player.asin === b.asin) {
if (!player.playing) player = await playerToggle()
return
}
player = await playerLoad(b.asin, b.title, false)
info = ''
} catch (e) {
error = String(e)

View File

@ -57,8 +57,8 @@ export interface PlayerState {
cover: string | null
}
export const playerLoad = (asin: string, title: string) =>
invoke<PlayerState>('player_load', { asin, title })
export const playerLoad = (asin: string, title: string, paused = false) =>
invoke<PlayerState>('player_load', { asin, title, paused })
export const playerToggle = () => invoke<PlayerState>('player_toggle')
export const playerSeek = (secs: number) => invoke<PlayerState>('player_seek', { secs })
export const playerSetPosition = (pos: number) =>