mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 18:26:15 +00:00
Fix clear playlist
This commit is contained in:
parent
42fac71033
commit
e69b01e825
2 changed files with 6 additions and 1 deletions
|
@ -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()
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
import xbmc
|
import xbmc
|
||||||
|
|
Loading…
Reference in a new issue