Fix PKC resuming instead of playing from the beginning
This commit is contained in:
parent
71935bf6ac
commit
e73c14bcf4
1 changed files with 21 additions and 19 deletions
|
@ -572,10 +572,12 @@ def threaded_playback(kodi_playlist, startpos, offset):
|
||||||
LOG.debug('threaded_playback with startpos %s, offset %s',
|
LOG.debug('threaded_playback with startpos %s, offset %s',
|
||||||
startpos, offset)
|
startpos, offset)
|
||||||
app.APP.player.play(kodi_playlist, None, False, startpos)
|
app.APP.player.play(kodi_playlist, None, False, startpos)
|
||||||
if offset:
|
offset = offset if offset else 0
|
||||||
i = 0
|
i = 0
|
||||||
while not app.APP.is_playing or not js.get_player_ids():
|
while not app.APP.is_playing or not js.get_player_ids():
|
||||||
app.APP.monitor.waitForAbort(0.1)
|
if app.APP.monitor.waitForAbort(0.1):
|
||||||
|
# PKC needs to quit
|
||||||
|
return
|
||||||
i += 1
|
i += 1
|
||||||
if i > 200:
|
if i > 200:
|
||||||
LOG.error('Could not seek to %s', offset)
|
LOG.error('Could not seek to %s', offset)
|
||||||
|
|
Loading…
Reference in a new issue