Adjust playback cleanup for empty video file

This commit is contained in:
Croneter 2018-03-27 18:20:36 +02:00
parent fc836bebe6
commit 6aa3e612cf

View file

@ -145,10 +145,6 @@ class PKC_Player(xbmc.Player):
Will be called when playback is stopped by the user Will be called when playback is stopped by the user
""" """
LOG.debug("ONPLAYBACK_STOPPED") LOG.debug("ONPLAYBACK_STOPPED")
if state.PKC_CAUSED_STOP is True:
state.PKC_CAUSED_STOP = False
LOG.debug('PKC caused this playback stop - ignoring')
else:
playback_cleanup() playback_cleanup()
def onPlayBackEnded(self): def onPlayBackEnded(self):
@ -156,4 +152,8 @@ class PKC_Player(xbmc.Player):
Will be called when playback ends due to the media file being finished Will be called when playback ends due to the media file being finished
""" """
LOG.debug("ONPLAYBACK_ENDED") LOG.debug("ONPLAYBACK_ENDED")
playback_cleanup(ended=True) if state.PKC_CAUSED_STOP is True:
state.PKC_CAUSED_STOP = False
LOG.debug('PKC caused this playback stop - ignoring')
else:
playback_cleanup()