Sleep a bit before marking item as fully watched

This commit is contained in:
croneter 2017-09-13 20:21:09 +02:00
parent eaff13998b
commit d7c3be5a68

View file

@ -352,6 +352,8 @@ class Player(xbmc.Player):
log.info("Percent complete: %s Mark played at: %s" log.info("Percent complete: %s Mark played at: %s"
% (percentComplete, markPlayed)) % (percentComplete, markPlayed))
if percentComplete >= markPlayed: if percentComplete >= markPlayed:
# Kodi seems to sometimes overwrite our playstate, so wait
xbmc.sleep(500)
# Tell Kodi that we've finished watching (Plex knows) # Tell Kodi that we've finished watching (Plex knows)
if (data['fileid'] is not None and if (data['fileid'] is not None and
data['itemType'] in (v.KODI_TYPE_MOVIE, data['itemType'] in (v.KODI_TYPE_MOVIE,