diff --git a/syncplay/client.py b/syncplay/client.py index 0b105e0c6..0ec266e59 100755 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -635,6 +635,9 @@ def setServerVersion(self, version, featureList): self.serverVersion = version self.checkForFeatureSupport(featureList) + def sendFeaturesToPlayer(self): + self._player.setFeatures(self.serverFeatures) + def checkForFeatureSupport(self, featureList): self.serverFeatures = { "featureList": utils.meetsMinVersion(self.serverVersion, constants.FEATURE_LIST_MIN_VERSION), @@ -671,7 +674,10 @@ def checkForFeatureSupport(self, featureList): "backslashSubstituteCharacter={}".format(constants.MPV_INPUT_BACKSLASH_SUBSTITUTE_CHARACTER)] self.ui.setFeatures(self.serverFeatures) if self._player: - self._player.setFeatures(self.serverFeatures) + self.sendFeaturesToPlayer() + else: + # Player might not have been loaded if connecting to localhost (#545) + self.addPlayerReadyCallback(lambda x: self.sendFeaturesToPlayer()) def getSanitizedCurrentUserFile(self): if self.userlist.currentUser.file: