Improve player.py stability
This commit is contained in:
parent
a7832b5ceb
commit
5a11cd70d1
1 changed files with 11 additions and 3 deletions
|
@ -108,7 +108,10 @@ class Player(xbmc.Player):
|
||||||
if (window('plex_customplaylist') == "true" and customseek):
|
if (window('plex_customplaylist') == "true" and customseek):
|
||||||
# Start at, when using custom playlist (play to Kodi from webclient)
|
# Start at, when using custom playlist (play to Kodi from webclient)
|
||||||
self.logMsg("Seeking to: %s" % customseek, 1)
|
self.logMsg("Seeking to: %s" % customseek, 1)
|
||||||
self.xbmcplayer.seekTime(int(customseek))
|
try:
|
||||||
|
self.xbmcplayer.seekTime(int(customseek))
|
||||||
|
except:
|
||||||
|
self.logMsg('Could not seek!', -1)
|
||||||
window('plex_customplaylist.seektime', clear=True)
|
window('plex_customplaylist.seektime', clear=True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -220,8 +223,13 @@ class Player(xbmc.Player):
|
||||||
try:
|
try:
|
||||||
runtime = int(runtime)
|
runtime = int(runtime)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
runtime = self.xbmcplayer.getTotalTime()
|
try:
|
||||||
self.logMsg("Runtime is missing, Kodi runtime: %s" % runtime, 1)
|
runtime = self.xbmcplayer.getTotalTime()
|
||||||
|
self.logMsg("Runtime is missing, Kodi runtime: %s"
|
||||||
|
% runtime, 1)
|
||||||
|
except:
|
||||||
|
self.logMsg('Could not get kodi runtime, setting to zero', -1)
|
||||||
|
runtime = 0
|
||||||
|
|
||||||
playQueueVersion = window('playQueueVersion')
|
playQueueVersion = window('playQueueVersion')
|
||||||
playQueueID = window('playQueueID')
|
playQueueID = window('playQueueID')
|
||||||
|
|
Loading…
Reference in a new issue