From 26a4d0724612eb306b42a958d29d9273c4fd7817 Mon Sep 17 00:00:00 2001 From: sfaulds Date: Thu, 10 Nov 2016 11:49:38 +1100 Subject: [PATCH] only set progress if we could get the position --- resources/lib/player.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/lib/player.py b/resources/lib/player.py index 9f196e66..a61f1b6a 100644 --- a/resources/lib/player.py +++ b/resources/lib/player.py @@ -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):