mirror of https://github.com/Syncplay/syncplay
parent
e7b824c124
commit
a0a6e6a644
|
@ -115,6 +115,7 @@ LAST_PAUSED_DIFF_THRESHOLD = 2
|
||||||
FILENAME_STRIP_REGEX = "[-~_\.\[\](): ]"
|
FILENAME_STRIP_REGEX = "[-~_\.\[\](): ]"
|
||||||
CONTROL_PASSWORD_STRIP_REGEX = "[^a-zA-Z0-9\-]"
|
CONTROL_PASSWORD_STRIP_REGEX = "[^a-zA-Z0-9\-]"
|
||||||
ROOM_NAME_STRIP_REGEX = "^(\+)(?P<roomnamebase>.*)(:)(\w{12})$"
|
ROOM_NAME_STRIP_REGEX = "^(\+)(?P<roomnamebase>.*)(:)(\w{12})$"
|
||||||
|
ARGUMENT_SPLIT_REGEX = r'(?:[^\s"]+|"[^"]*")+'
|
||||||
COMMANDS_UNDO = ["u", "undo", "revert"]
|
COMMANDS_UNDO = ["u", "undo", "revert"]
|
||||||
COMMANDS_CHAT = ["ch", "chat"]
|
COMMANDS_CHAT = ["ch", "chat"]
|
||||||
COMMANDS_LIST = ["l", "list", "users"]
|
COMMANDS_LIST = ["l", "list", "users"]
|
||||||
|
|
|
@ -487,10 +487,14 @@ class VlcPlayer(BasePlayer):
|
||||||
|
|
||||||
call.extend(self.__playerController.SLAVE_ARGS)
|
call.extend(self.__playerController.SLAVE_ARGS)
|
||||||
if args:
|
if args:
|
||||||
call.extend(args)
|
for arg in args:
|
||||||
|
if "=" in arg and "\"" in arg:
|
||||||
|
(argName, argValue) = arg.split("=", 1)
|
||||||
|
if argValue.startswith("\"") and argValue.endswith("\""):
|
||||||
|
arg = argName + "=" + argValue[1:-1]
|
||||||
|
call.extend([arg])
|
||||||
|
|
||||||
self._vlcVersion = None
|
self._vlcVersion = None
|
||||||
|
|
||||||
if isWindows() and getattr(sys, 'frozen', '') and getattr(sys, '_MEIPASS', '') is not None: # Needed for pyinstaller --onefile bundle
|
if isWindows() and getattr(sys, 'frozen', '') and getattr(sys, '_MEIPASS', '') is not None: # Needed for pyinstaller --onefile bundle
|
||||||
self.__process = subprocess.Popen(
|
self.__process = subprocess.Popen(
|
||||||
call, stdin=subprocess.PIPE, stderr=subprocess.PIPE, stdout=subprocess.PIPE,
|
call, stdin=subprocess.PIPE, stderr=subprocess.PIPE, stdout=subprocess.PIPE,
|
||||||
|
|
|
@ -279,7 +279,7 @@ class ConfigDialog(QtWidgets.QDialog):
|
||||||
currentplayerpath = self.executablepathCombobox.currentText()
|
currentplayerpath = self.executablepathCombobox.currentText()
|
||||||
|
|
||||||
if currentplayerpath:
|
if currentplayerpath:
|
||||||
NewPlayerArgs = self.playerargsTextbox.text().split(" ") if self.playerargsTextbox.text() else ""
|
NewPlayerArgs = utils.parseCommandLineString(self.playerargsTextbox.text()) if self.playerargsTextbox.text() else ""
|
||||||
self.perPlayerArgs[self.executablepathCombobox.currentText()] = NewPlayerArgs
|
self.perPlayerArgs[self.executablepathCombobox.currentText()] = NewPlayerArgs
|
||||||
|
|
||||||
def languageChanged(self):
|
def languageChanged(self):
|
||||||
|
|
|
@ -191,6 +191,10 @@ def limitedPowerset(s, minLength):
|
||||||
return itertools.chain.from_iterable(itertools.combinations(s, r) for r in range(len(s), minLength, -1))
|
return itertools.chain.from_iterable(itertools.combinations(s, r) for r in range(len(s), minLength, -1))
|
||||||
|
|
||||||
|
|
||||||
|
def parseCommandLineString(s):
|
||||||
|
arsToReturn = re.findall(constants.ARGUMENT_SPLIT_REGEX, s)
|
||||||
|
return arsToReturn
|
||||||
|
|
||||||
def blackholeStdoutForFrozenWindow():
|
def blackholeStdoutForFrozenWindow():
|
||||||
if getattr(sys, 'frozen', '') == "windows_exe":
|
if getattr(sys, 'frozen', '') == "windows_exe":
|
||||||
class Stderr(object):
|
class Stderr(object):
|
||||||
|
|
Loading…
Reference in New Issue