mirror of https://github.com/Syncplay/syncplay
Fix Syncplay handling of file duration in mpv >~0.28.0 caused by mpv commit 877775f
This commit is contained in:
parent
b568652824
commit
78c29ec5b2
|
@ -177,7 +177,7 @@ USERLIST_GUI_FILENAME_COLUMN = 3
|
|||
MPLAYER_SLAVE_ARGS = ['-slave', '--hr-seek=always', '-nomsgcolor', '-msglevel', 'all=1:global=4:cplayer=4', '-af-add', 'scaletempo']
|
||||
MPV_ARGS = ['--force-window', '--idle', '--hr-seek=always', '--keep-open']
|
||||
MPV_SLAVE_ARGS = ['--msg-level=all=error,cplayer=info,term-msg=info', '--input-terminal=no', '--input-file=/dev/stdin']
|
||||
MPV_SLAVE_ARGS_NEW = ['--term-playing-msg=<SyncplayUpdateFile>\nANS_filename=${filename}\nANS_length=${=length:${=duration:0}}\nANS_path=${path}\n</SyncplayUpdateFile>', '--terminal=yes']
|
||||
MPV_SLAVE_ARGS_NEW = ['--term-playing-msg=<SyncplayUpdateFile>\nANS_filename=${filename}\nANS_length=${=duration:${=length:0}}\nANS_path=${path}\n</SyncplayUpdateFile>', '--terminal=yes']
|
||||
MPV_NEW_VERSION = False
|
||||
VLC_SLAVE_ARGS = ['--extraintf=luaintf', '--lua-intf=syncplay', '--no-quiet', '--no-input-fast-seek',
|
||||
'--play-and-pause', '--start-time=0']
|
||||
|
|
|
@ -183,7 +183,10 @@ class MplayerPlayer(BasePlayer):
|
|||
self._storePauseState(bool(value == 'yes'))
|
||||
self._pausedAsk.set()
|
||||
elif name == "length":
|
||||
self._duration = float(value)
|
||||
try:
|
||||
self._duration = float(value)
|
||||
except:
|
||||
self._duration = 0
|
||||
self._durationAsk.set()
|
||||
elif name == "path":
|
||||
self._filepath = value
|
||||
|
|
Loading…
Reference in New Issue