Fix seek detection

onPlayBackSeek seems to not trigger in Leia. Use monitor event Player.OnAVChange.
This commit is contained in:
angelblue05 2018-09-09 18:33:41 -05:00
parent 3da0ab5b24
commit ea97465050

View file

@ -60,7 +60,7 @@ class Monitor(xbmc.Monitor):
data = json.loads(data)[0]
else:
if method not in ('Player.OnPlay', 'VideoLibrary.OnUpdate', 'System.OnSleep'):
if method not in ('Player.OnPlay', 'VideoLibrary.OnUpdate', 'System.OnSleep', 'Player.OnAVChange'):
return
data = json.loads(data)
@ -196,8 +196,8 @@ class Monitor(xbmc.Monitor):
data.get('StartPositionTicks', 0), data.get('AudioStreamIndex'),
data.get('SubtitleStreamIndex')).start()
elif method == 'ReportProgressRequested':
self.player.report_playback(data['Report'])
elif method in ('ReportProgressRequested', 'Player.OnAVChange'):
self.player.report_playback(data.get('Report', True))
elif method == 'Playstate':
self.playstate(data)