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
1 changed files with 8 additions and 3 deletions

View File

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