mirror of https://github.com/Syncplay/syncplay
[mpv] No more --slave-broken
This commit is contained in:
parent
ed49f05c30
commit
812f5e7acc
|
@ -134,10 +134,8 @@ USERLIST_GUI_USERNAME_OFFSET = 21 # Pixels
|
||||||
|
|
||||||
MPLAYER_SLAVE_ARGS = ['-slave', '--hr-seek=always', '-nomsgcolor', '-msglevel', 'all=1:global=4:cplayer=4', '-af', 'scaletempo']
|
MPLAYER_SLAVE_ARGS = ['-slave', '--hr-seek=always', '-nomsgcolor', '-msglevel', 'all=1:global=4:cplayer=4', '-af', 'scaletempo']
|
||||||
# --quiet works with both mpv 0.2 and 0.3
|
# --quiet works with both mpv 0.2 and 0.3
|
||||||
MPV_SLAVE_ARGS = ['--force-window','--idle','--hr-seek=always', '--quiet', '--keep-open', '-af', 'scaletempo']
|
MPV_SLAVE_ARGS = ['--force-window', '--idle', '--hr-seek=always', '--quiet', '--keep-open', '--af=scaletempo', '--input-terminal=no', '--input-file=/dev/stdin']
|
||||||
MPV_SLAVE_ARGS_WINDOWS = ['--slave-broken']
|
MPV_SLAVE_ARGS_NEW = ['--term-playing-msg=<SyncplayUpdateFile>\nANS_filename=${filename}\nANS_length=${=length}\nANS_path=${path}\n</SyncplayUpdateFile>', '--terminal=yes']
|
||||||
MPV_SLAVE_ARGS_NONWINDOWS = ['--input-terminal=no','--input-file=/dev/stdin']
|
|
||||||
MPV_SLAVE_ARGS_NEW = ['--term-playing-msg=<SyncplayUpdateFile>\nANS_filename=${filename}\nANS_length=${=length}\nANS_path=${path}\n</SyncplayUpdateFile>','--terminal=yes']
|
|
||||||
MPV_NEW_VERSION = False
|
MPV_NEW_VERSION = False
|
||||||
VLC_SLAVE_ARGS = ['--extraintf=luaintf', '--lua-intf=syncplay', '--no-quiet', '--no-input-fast-seek',
|
VLC_SLAVE_ARGS = ['--extraintf=luaintf', '--lua-intf=syncplay', '--no-quiet', '--no-input-fast-seek',
|
||||||
'--play-and-pause', '--start-time=0']
|
'--play-and-pause', '--start-time=0']
|
||||||
|
|
|
@ -15,7 +15,7 @@ class MpvPlayer(MplayerPlayer):
|
||||||
ver = MpvPlayer.RE_VERSION.search(subprocess.check_output([playerPath, '--version']))
|
ver = MpvPlayer.RE_VERSION.search(subprocess.check_output([playerPath, '--version']))
|
||||||
except:
|
except:
|
||||||
ver = None
|
ver = None
|
||||||
constants.MPV_NEW_VERSION = ver is None or int(ver.group(1)) > 0 or int(ver.group(2)) >= 5
|
constants.MPV_NEW_VERSION = ver is None or int(ver.group(1)) > 0 or int(ver.group(2)) >= 6
|
||||||
if constants.MPV_NEW_VERSION:
|
if constants.MPV_NEW_VERSION:
|
||||||
return NewMpvPlayer(client, MpvPlayer.getExpandedPath(playerPath), filePath, args)
|
return NewMpvPlayer(client, MpvPlayer.getExpandedPath(playerPath), filePath, args)
|
||||||
else:
|
else:
|
||||||
|
@ -24,12 +24,8 @@ class MpvPlayer(MplayerPlayer):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def getStartupArgs(path):
|
def getStartupArgs(path):
|
||||||
args = constants.MPV_SLAVE_ARGS
|
args = constants.MPV_SLAVE_ARGS
|
||||||
if constants.MPV_NEW_VERSION or sys.platform.startswith('win'):
|
if constants.MPV_NEW_VERSION:
|
||||||
args.extend(constants.MPV_SLAVE_ARGS_NEW)
|
args.extend(constants.MPV_SLAVE_ARGS_NEW)
|
||||||
if sys.platform.startswith('win') or not constants.MPV_NEW_VERSION:
|
|
||||||
args.extend(constants.MPV_SLAVE_ARGS_WINDOWS)
|
|
||||||
else:
|
|
||||||
args.extend(constants.MPV_SLAVE_ARGS_NONWINDOWS)
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
Loading…
Reference in New Issue