moved logic to playbackengine, forceRestart preserves pause state

This commit is contained in:
Siiiiinth
2026-01-05 00:25:33 +01:00
parent bc472eb065
commit 81c935fdd0
3 changed files with 16 additions and 9 deletions
+2 -3
View File
@@ -349,9 +349,8 @@ func (p *Player) Continue() error {
return nil
}
func (p *Player) ForceRestartPlayback() error {
p.mpv.SetProperty("pause", mpv.FORMAT_FLAG, true)
return p.mpv.SetProperty("pause", mpv.FORMAT_FLAG, false)
func (p *Player) ForceRestartPlayback(isPaused bool) error {
return p.mpv.SetProperty("pause", mpv.FORMAT_FLAG, isPaused)
}
// Get the current status of the player.