Make mpv code compatible with mpvnet
This commit is contained in:
parent
0332af0458
commit
0f284e7329
@ -1,5 +1,5 @@
|
||||
version = '1.6.5'
|
||||
revision = ' development'
|
||||
milestone = 'Yoitsu'
|
||||
release_number = '80'
|
||||
release_number = '81'
|
||||
projectURL = 'https://syncplay.pl/'
|
||||
|
||||
@ -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", "<NEWLINE>")).replace(
|
||||
"\\\\", constants.MPV_INPUT_BACKSLASH_SUBSTITUTE_CHARACTER).replace("<NEWLINE>", "\\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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user