From 888bb537f78d26a6e8e52669f347fab5ea635e9b Mon Sep 17 00:00:00 2001 From: Etoh Date: Wed, 7 Feb 2024 19:22:02 +0000 Subject: [PATCH] MPC: Only reset position if file is playing (#663) Avoids MpcHcApi.PlayerNotReadyException if you add media to empty playlist. --- syncplay/players/mpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncplay/players/mpc.py b/syncplay/players/mpc.py index 05150dd..51329bd 100755 --- a/syncplay/players/mpc.py +++ b/syncplay/players/mpc.py @@ -407,7 +407,7 @@ class MPCHCAPIPlayer(BasePlayer): def openFile(self, filePath, resetPosition=False): self._mpcApi.openFile(filePath) - if resetPosition: + if resetPosition and self._mpcApi.filePlaying: self.setPosition(0, resetPosition=True) def displayMessage(