mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Remove double player
This commit is contained in:
parent
1da4d0cf2e
commit
b1517c7632
1 changed files with 5 additions and 6 deletions
|
@ -39,7 +39,6 @@ class Player(xbmc.Player):
|
||||||
self.doUtils = downloadutils.DownloadUtils().downloadUrl
|
self.doUtils = downloadutils.DownloadUtils().downloadUrl
|
||||||
self.emby = embyserver.Read_EmbyServer()
|
self.emby = embyserver.Read_EmbyServer()
|
||||||
self.ws = wsc.WebSocketClient()
|
self.ws = wsc.WebSocketClient()
|
||||||
self.xbmcplayer = xbmc.Player()
|
|
||||||
|
|
||||||
log.debug("Starting playback monitor.")
|
log.debug("Starting playback monitor.")
|
||||||
xbmc.Player.__init__(self)
|
xbmc.Player.__init__(self)
|
||||||
|
@ -84,7 +83,7 @@ class Player(xbmc.Player):
|
||||||
|
|
||||||
# Get current file
|
# Get current file
|
||||||
try:
|
try:
|
||||||
currentFile = self.xbmcplayer.getPlayingFile()
|
currentFile = self.getPlayingFile()
|
||||||
xbmc.sleep(300)
|
xbmc.sleep(300)
|
||||||
except:
|
except:
|
||||||
currentFile = ""
|
currentFile = ""
|
||||||
|
@ -92,7 +91,7 @@ class Player(xbmc.Player):
|
||||||
while not currentFile:
|
while not currentFile:
|
||||||
xbmc.sleep(100)
|
xbmc.sleep(100)
|
||||||
try:
|
try:
|
||||||
currentFile = self.xbmcplayer.getPlayingFile()
|
currentFile = self.getPlayingFile()
|
||||||
except: pass
|
except: pass
|
||||||
|
|
||||||
if count == 10: # try 5 times
|
if count == 10: # try 5 times
|
||||||
|
@ -142,11 +141,11 @@ class Player(xbmc.Player):
|
||||||
if window('emby_customPlaylist') == "true" and customseek:
|
if window('emby_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)
|
||||||
log.info("Seeking to: %s", customseek)
|
log.info("Seeking to: %s", customseek)
|
||||||
self.xbmcplayer.seekTime(int(customseek)/10000000.0)
|
self.seekTime(int(customseek)/10000000.0)
|
||||||
window('emby_customPlaylist.seektime', clear=True)
|
window('emby_customPlaylist.seektime', clear=True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
seekTime = self.xbmcplayer.getTime()
|
seekTime = self.getTime()
|
||||||
except:
|
except:
|
||||||
# at this point we should be playing and if not then bail out
|
# at this point we should be playing and if not then bail out
|
||||||
return
|
return
|
||||||
|
@ -245,7 +244,7 @@ class Player(xbmc.Player):
|
||||||
runtime = int(runtime)
|
runtime = int(runtime)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
try:
|
try:
|
||||||
runtime = int(self.xbmcplayer.getTotalTime())
|
runtime = int(self.getTotalTime())
|
||||||
log.info("Runtime is missing, Kodi runtime: %s" % runtime)
|
log.info("Runtime is missing, Kodi runtime: %s" % runtime)
|
||||||
except:
|
except:
|
||||||
runtime = 0
|
runtime = 0
|
||||||
|
|
Loading…
Reference in a new issue