[mpv] Use profile=pseudo-gui if available
Makes mpv act as if it wasn't started through Syncplay. --profile=pseudo-gui was added in 0.9.0.
This commit is contained in:
parent
b8c8343f9a
commit
0b8afd72ec
@ -133,9 +133,10 @@ STYLE_NOTCONTROLLER_COLOR = 'grey'
|
||||
USERLIST_GUI_USERNAME_OFFSET = 21 # Pixels
|
||||
|
||||
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
|
||||
MPV_SLAVE_ARGS = ['--force-window', '--idle', '--hr-seek=always', '--quiet', '--keep-open', '--af=scaletempo', '--input-terminal=no', '--input-file=/dev/stdin']
|
||||
MPV_SLAVE_ARGS = ['--hr-seek=always', '--quiet', '--af=scaletempo', '--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_SLAVE_GUI = ['--force-window', '--idle', '--keep-open']
|
||||
MPV_SLAVE_GUI_NEW = ['--profile=pseudo-gui']
|
||||
MPV_NEW_VERSION = False
|
||||
VLC_SLAVE_ARGS = ['--extraintf=luaintf', '--lua-intf=syncplay', '--no-quiet', '--no-input-fast-seek',
|
||||
'--play-and-pause', '--start-time=0']
|
||||
|
||||
@ -24,6 +24,16 @@ class MpvPlayer(MplayerPlayer):
|
||||
@staticmethod
|
||||
def getStartupArgs(path):
|
||||
args = constants.MPV_SLAVE_ARGS
|
||||
|
||||
try:
|
||||
pseudogui = subprocess.check_output([path, '--profile=help'])
|
||||
except:
|
||||
pseudogui = ''
|
||||
if 'pseudo-gui' in pseudogui:
|
||||
args.extend(constants.MPV_SLAVE_GUI_NEW)
|
||||
else:
|
||||
args.extend(constants.MPV_SLAVE_GUI)
|
||||
|
||||
if constants.MPV_NEW_VERSION:
|
||||
args.extend(constants.MPV_SLAVE_ARGS_NEW)
|
||||
return args
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user