mirror of https://github.com/Syncplay/syncplay
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):
|
||||
self._mpcApi.openFile(filePath)
|
||||
if resetPosition:
|
||||
if resetPosition and self._mpcApi.filePlaying:
|
||||
self.setPosition(0, resetPosition=True)
|
||||
|
||||
def displayMessage(
|
||||
|
|
Loading…
Reference in New Issue