From 513362eb2bbf83b7c048c59afca4c84fe0746b92 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 16 May 2015 03:45:41 -0500 Subject: [PATCH] Last one, promise! Make seeking reflect more accurately when reporting to dashboard --- resources/lib/Player.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/resources/lib/Player.py b/resources/lib/Player.py index 6372e7ba..4364892f 100644 --- a/resources/lib/Player.py +++ b/resources/lib/Player.py @@ -208,7 +208,14 @@ class Player( xbmc.Player ): def onPlayBackSeek( self, time, seekOffset ): self.logMsg("PLAYBACK_SEEK",2) - self.reportPlayback() + # Make position when seeking a bit more accurate + try: + playTime = xbmc.Player().getTime() + currentFile = xbmc.Player().getPlayingFile() + if(self.played_information.get(currentFile) != None): + self.played_information[currentFile]["currentPosition"] = playTime + self.reportPlayback() + except: pass def onPlayBackStarted( self ): # Will be called when xbmc starts playing a file