only set progress if we could get the position

This commit is contained in:
sfaulds 2016-11-10 11:49:38 +11:00
parent 774700bdc8
commit 26a4d07246

View file

@ -385,10 +385,15 @@ class Player(xbmc.Player):
log.debug("PLAYBACK_SEEK: %s" % currentFile) log.debug("PLAYBACK_SEEK: %s" % currentFile)
if self.played_info.get(currentFile): if self.played_info.get(currentFile):
position = self.xbmcplayer.getTime() position = None
self.played_info[currentFile]['currentPosition'] = position try:
position = self.xbmcplayer.getTime()
except:
pass
self.reportPlayback() if position is not None:
self.played_info[currentFile]['currentPosition'] = position
self.reportPlayback()
@log_error() @log_error()
def onPlayBackStopped(self): def onPlayBackStopped(self):