mirror of
https://github.com/Syncplay/syncplay
synced 2025-03-02 17:57:32 +00:00
MPC: Only reset position if file is playing (#663)
Avoids MpcHcApi.PlayerNotReadyException if you add media to empty playlist.
This commit is contained in:
parent
c670acba1f
commit
888bb537f7
@ -407,7 +407,7 @@ class MPCHCAPIPlayer(BasePlayer):
|
|||||||
|
|
||||||
def openFile(self, filePath, resetPosition=False):
|
def openFile(self, filePath, resetPosition=False):
|
||||||
self._mpcApi.openFile(filePath)
|
self._mpcApi.openFile(filePath)
|
||||||
if resetPosition:
|
if resetPosition and self._mpcApi.filePlaying:
|
||||||
self.setPosition(0, resetPosition=True)
|
self.setPosition(0, resetPosition=True)
|
||||||
|
|
||||||
def displayMessage(
|
def displayMessage(
|
||||||
|
Loading…
Reference in New Issue
Block a user