MPC: Only reset position if file is playing (#663)

Avoids MpcHcApi.PlayerNotReadyException if you add media to empty playlist.
This commit is contained in:
Etoh 2024-02-07 19:22:02 +00:00 committed by GitHub
parent c670acba1f
commit 888bb537f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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(