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: else:
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) 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.") log.info("Clear playlist, end detected.")
playlist.clear() playlist.clear()

View File

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