From 0f284e7329eed6a86ecbfd9a2d3a3c392bfbedc3 Mon Sep 17 00:00:00 2001 From: et0h Date: Wed, 7 Aug 2019 22:26:22 +0100 Subject: [PATCH] Make mpv code compatible with mpvnet --- syncplay/__init__.py | 2 +- syncplay/players/mpv.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/syncplay/__init__.py b/syncplay/__init__.py index 08032d7..5132d32 100755 --- a/syncplay/__init__.py +++ b/syncplay/__init__.py @@ -1,5 +1,5 @@ version = '1.6.5' revision = ' development' milestone = 'Yoitsu' -release_number = '80' +release_number = '81' projectURL = 'https://syncplay.pl/' diff --git a/syncplay/players/mpv.py b/syncplay/players/mpv.py index 622d296..c27a684 100755 --- a/syncplay/players/mpv.py +++ b/syncplay/players/mpv.py @@ -128,7 +128,7 @@ class NewMpvPlayer(OldMpvPlayer): def displayMessage(self, message, duration=(constants.OSD_DURATION * 1000), OSDType=constants.OSD_NOTIFICATION, mood=constants.MESSAGE_NEUTRAL): if not self._client._config["chatOutputEnabled"]: - super(self.__class__, self).displayMessage(message=message, duration=duration, OSDType=OSDType, mood=mood) + MplayerPlayer.displayMessage(self, message=message, duration=duration, OSDType=OSDType, mood=mood) return messageString = self._sanitizeText(message.replace("\\n", "")).replace( "\\\\", constants.MPV_INPUT_BACKSLASH_SUBSTITUTE_CHARACTER).replace("", "\\n") @@ -136,7 +136,7 @@ class NewMpvPlayer(OldMpvPlayer): def displayChatMessage(self, username, message): if not self._client._config["chatOutputEnabled"]: - super(self.__class__, self).displayChatMessage(username, message) + MplayerPlayer.displayChatMessage(self, username, message) return username = self._sanitizeText(username.replace("\\", constants.MPV_INPUT_BACKSLASH_SUBSTITUTE_CHARACTER)) message = self._sanitizeText(message.replace("\\", constants.MPV_INPUT_BACKSLASH_SUBSTITUTE_CHARACTER)) @@ -252,7 +252,7 @@ class NewMpvPlayer(OldMpvPlayer): self._client.ui.showDebugMessage( "Did not seek as recently reset and {} below 'do not reset position' threshold".format(value)) return - super(self.__class__, self).setPosition(value) + MplayerPlayer.setPosition(self, value) self.lastMPVPositionUpdate = time.time() def openFile(self, filePath, resetPosition=False):