Fix clear playlist

This commit is contained in:
angelblue05 2018-01-11 02:09:18 -06:00
parent 42fac71033
commit e69b01e825
2 changed files with 6 additions and 1 deletions

View file

@ -496,7 +496,11 @@ class Player(xbmc.Player):
else:
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
if playlist.getposition < 0:
if int(playlist.getposition()) < 0:
''' If playback is stopped within the first 30 seconds,
Kodi doesn't consider this watched and playlist should not be cleared.
When the end is reached, position is -1.
'''
log.info("Clear playlist, end detected.")
playlist.clear()

View file

@ -4,6 +4,7 @@
import collections
import logging
import os
import urllib
import xbmc