mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
self.xbmcplayer
This commit is contained in:
parent
e3d2a6ff72
commit
481af3823f
1 changed files with 5 additions and 7 deletions
|
@ -51,12 +51,11 @@ class Player(xbmc.Player):
|
||||||
|
|
||||||
window = utils.window
|
window = utils.window
|
||||||
# Will be called when xbmc starts playing a file
|
# Will be called when xbmc starts playing a file
|
||||||
xbmcplayer = self.xbmcplayer
|
|
||||||
self.stopAll()
|
self.stopAll()
|
||||||
|
|
||||||
# Get current file
|
# Get current file
|
||||||
try:
|
try:
|
||||||
currentFile = xbmcplayer.getPlayingFile()
|
currentFile = self.xbmcplayer.getPlayingFile()
|
||||||
xbmc.sleep(300)
|
xbmc.sleep(300)
|
||||||
except:
|
except:
|
||||||
currentFile = ""
|
currentFile = ""
|
||||||
|
@ -64,7 +63,7 @@ class Player(xbmc.Player):
|
||||||
while not currentFile:
|
while not currentFile:
|
||||||
xbmc.sleep(100)
|
xbmc.sleep(100)
|
||||||
try:
|
try:
|
||||||
currentFile = xbmcplayer.getPlayingFile()
|
currentFile = self.xbmcplayer.getPlayingFile()
|
||||||
except: pass
|
except: pass
|
||||||
|
|
||||||
if count == 5: # try 5 times
|
if count == 5: # try 5 times
|
||||||
|
@ -104,10 +103,10 @@ 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)
|
||||||
self.logMsg("Seeking to: %s" % customseek, 1)
|
self.logMsg("Seeking to: %s" % customseek, 1)
|
||||||
xbmcplayer.seekTime(int(customseek)/10000000.0)
|
self.xbmcplayer.seekTime(int(customseek)/10000000.0)
|
||||||
window('emby_customPlaylist.seektime', clear=True)
|
window('emby_customPlaylist.seektime', clear=True)
|
||||||
|
|
||||||
seekTime = xbmcplayer.getTime()
|
seekTime = self.xbmcplayer.getTime()
|
||||||
|
|
||||||
# Get playback volume
|
# Get playback volume
|
||||||
volume_query = {
|
volume_query = {
|
||||||
|
@ -215,7 +214,7 @@ class Player(xbmc.Player):
|
||||||
try:
|
try:
|
||||||
runtime = int(runtime)
|
runtime = int(runtime)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
runtime = xbmcplayer.getTotalTime()
|
runtime = self.xbmcplayer.getTotalTime()
|
||||||
self.logMsg("Runtime is missing, Kodi runtime: %s" % runtime, 1)
|
self.logMsg("Runtime is missing, Kodi runtime: %s" % runtime, 1)
|
||||||
|
|
||||||
# Save data map for updates and position calls
|
# Save data map for updates and position calls
|
||||||
|
@ -253,7 +252,6 @@ class Player(xbmc.Player):
|
||||||
def reportPlayback(self):
|
def reportPlayback(self):
|
||||||
|
|
||||||
self.logMsg("reportPlayback Called", 2)
|
self.logMsg("reportPlayback Called", 2)
|
||||||
xbmcplayer = self.xbmcplayer
|
|
||||||
|
|
||||||
# Get current file
|
# Get current file
|
||||||
currentFile = self.currentFile
|
currentFile = self.currentFile
|
||||||
|
|
Loading…
Reference in a new issue