parent
a92146abc2
commit
a7832b5ceb
1 changed files with 10 additions and 6 deletions
|
@ -111,7 +111,10 @@ class Player(xbmc.Player):
|
||||||
self.xbmcplayer.seekTime(int(customseek))
|
self.xbmcplayer.seekTime(int(customseek))
|
||||||
window('plex_customplaylist.seektime', clear=True)
|
window('plex_customplaylist.seektime', clear=True)
|
||||||
|
|
||||||
seekTime = self.xbmcplayer.getTime()
|
try:
|
||||||
|
seekTime = self.xbmcplayer.getTime()
|
||||||
|
except RuntimeError:
|
||||||
|
seekTime = 0
|
||||||
|
|
||||||
# Get playback volume
|
# Get playback volume
|
||||||
volume_query = {
|
volume_query = {
|
||||||
|
@ -419,7 +422,6 @@ class Player(xbmc.Player):
|
||||||
|
|
||||||
if self.played_info.get(currentFile):
|
if self.played_info.get(currentFile):
|
||||||
self.played_info[currentFile]['paused'] = True
|
self.played_info[currentFile]['paused'] = True
|
||||||
|
|
||||||
self.reportPlayback()
|
self.reportPlayback()
|
||||||
|
|
||||||
def onPlayBackResumed(self):
|
def onPlayBackResumed(self):
|
||||||
|
@ -429,7 +431,6 @@ class Player(xbmc.Player):
|
||||||
|
|
||||||
if self.played_info.get(currentFile):
|
if self.played_info.get(currentFile):
|
||||||
self.played_info[currentFile]['paused'] = False
|
self.played_info[currentFile]['paused'] = False
|
||||||
|
|
||||||
self.reportPlayback()
|
self.reportPlayback()
|
||||||
|
|
||||||
def onPlayBackSeek(self, time, seekOffset):
|
def onPlayBackSeek(self, time, seekOffset):
|
||||||
|
@ -438,11 +439,14 @@ class Player(xbmc.Player):
|
||||||
self.logMsg("PLAYBACK_SEEK: %s" % utils.tryDecode(currentFile), 2)
|
self.logMsg("PLAYBACK_SEEK: %s" % utils.tryDecode(currentFile), 2)
|
||||||
|
|
||||||
if self.played_info.get(currentFile):
|
if self.played_info.get(currentFile):
|
||||||
position = self.xbmcplayer.getTime()
|
try:
|
||||||
|
position = self.xbmcplayer.getTime()
|
||||||
|
except RuntimeError:
|
||||||
|
# When Kodi is not playing
|
||||||
|
return
|
||||||
self.played_info[currentFile]['currentPosition'] = position * 1000
|
self.played_info[currentFile]['currentPosition'] = position * 1000
|
||||||
|
|
||||||
self.reportPlayback()
|
self.reportPlayback()
|
||||||
|
|
||||||
def onPlayBackStopped(self):
|
def onPlayBackStopped(self):
|
||||||
# Will be called when user stops xbmc playing a file
|
# Will be called when user stops xbmc playing a file
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue