Make mpv code compatible with mpvnet
This commit is contained in:
parent
0332af0458
commit
0f284e7329
@ -1,5 +1,5 @@
|
|||||||
version = '1.6.5'
|
version = '1.6.5'
|
||||||
revision = ' development'
|
revision = ' development'
|
||||||
milestone = 'Yoitsu'
|
milestone = 'Yoitsu'
|
||||||
release_number = '80'
|
release_number = '81'
|
||||||
projectURL = 'https://syncplay.pl/'
|
projectURL = 'https://syncplay.pl/'
|
||||||
|
|||||||
@ -128,7 +128,7 @@ class NewMpvPlayer(OldMpvPlayer):
|
|||||||
def displayMessage(self, message, duration=(constants.OSD_DURATION * 1000), OSDType=constants.OSD_NOTIFICATION,
|
def displayMessage(self, message, duration=(constants.OSD_DURATION * 1000), OSDType=constants.OSD_NOTIFICATION,
|
||||||
mood=constants.MESSAGE_NEUTRAL):
|
mood=constants.MESSAGE_NEUTRAL):
|
||||||
if not self._client._config["chatOutputEnabled"]:
|
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
|
return
|
||||||
messageString = self._sanitizeText(message.replace("\\n", "<NEWLINE>")).replace(
|
messageString = self._sanitizeText(message.replace("\\n", "<NEWLINE>")).replace(
|
||||||
"\\\\", constants.MPV_INPUT_BACKSLASH_SUBSTITUTE_CHARACTER).replace("<NEWLINE>", "\\n")
|
"\\\\", constants.MPV_INPUT_BACKSLASH_SUBSTITUTE_CHARACTER).replace("<NEWLINE>", "\\n")
|
||||||
@ -136,7 +136,7 @@ class NewMpvPlayer(OldMpvPlayer):
|
|||||||
|
|
||||||
def displayChatMessage(self, username, message):
|
def displayChatMessage(self, username, message):
|
||||||
if not self._client._config["chatOutputEnabled"]:
|
if not self._client._config["chatOutputEnabled"]:
|
||||||
super(self.__class__, self).displayChatMessage(username, message)
|
MplayerPlayer.displayChatMessage(self, username, message)
|
||||||
return
|
return
|
||||||
username = self._sanitizeText(username.replace("\\", constants.MPV_INPUT_BACKSLASH_SUBSTITUTE_CHARACTER))
|
username = self._sanitizeText(username.replace("\\", constants.MPV_INPUT_BACKSLASH_SUBSTITUTE_CHARACTER))
|
||||||
message = self._sanitizeText(message.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(
|
self._client.ui.showDebugMessage(
|
||||||
"Did not seek as recently reset and {} below 'do not reset position' threshold".format(value))
|
"Did not seek as recently reset and {} below 'do not reset position' threshold".format(value))
|
||||||
return
|
return
|
||||||
super(self.__class__, self).setPosition(value)
|
MplayerPlayer.setPosition(self, value)
|
||||||
self.lastMPVPositionUpdate = time.time()
|
self.lastMPVPositionUpdate = time.time()
|
||||||
|
|
||||||
def openFile(self, filePath, resetPosition=False):
|
def openFile(self, filePath, resetPosition=False):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user