Hack for repeatedly starting same video using Addon Paths

This commit is contained in:
croneter 2018-02-16 17:25:17 +01:00
parent 7ce157accd
commit 121e8e0243
2 changed files with 8 additions and 0 deletions

View File

@ -217,6 +217,7 @@ class KodiMonitor(Monitor):
# Hack we need for RESUMABLE items because Kodi lost the path of the
# last played item that is now being replayed (see playback.py's
# Player().play())
# Also see playqueue.py _compare_playqueues()
LOG.info('Detected re-start of playback of last item')
old = state.OLD_PLAYER_STATES[data['playlistid']]
kwargs = {

View File

@ -195,6 +195,13 @@ class PlayqueueMonitor(Thread):
except PL.PlaylistError:
# Could not add the element
pass
except IndexError:
# This is really a hack - happens when using Addon Paths
# and repeatedly starting the same element. Kodi will then
# not pass kodi id nor file path AND will also not
# start-up playback. Hence kodimonitor kicks off playback.
# Also see kodimonitor.py - _playlist_onadd()
pass
else:
for j in range(i, len(index)):
index[j] += 1