Fix mpv pause state when loading new media

Fixes #107

This fixes an issue where loading a new media URL while the player
was paused would keep playback paused, causing Music Assistant to
show the player as playing while no audio was audible.

The mpv pause state is now always set explicitly when starting playback,
ensuring deterministic behavior
This commit is contained in:
Philipp Grafe committed 2026-02-03 21:34:57 +01:00
1 parent 7a92d69864
commit d42abaa2c9
6 files changed
+205 -68

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
from abc import ABC, abstractmethod
from .state import PlayerState
class AudioPlayer(ABC):
@abstractmethod
def play(self, url: str) -> None:
pass
@abstractmethod
def pause(self) -> None:
pass
@abstractmethod
def resume(self) -> None:
pass
@abstractmethod
def stop(self) -> None:
pass
@abstractmethod
def state(self) -> PlayerState:
pass