mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-13 21:56:11 +00:00
Update playbackutils
Seems a slightly later date build of krypton doesn't need the workaround for widgets.
This commit is contained in:
parent
a33d97a2fd
commit
3c9785073f
2 changed files with 17 additions and 12 deletions
|
@ -54,6 +54,22 @@ class PlaybackUtils(object):
|
||||||
|
|
||||||
def _detect_widgets(self):
|
def _detect_widgets(self):
|
||||||
|
|
||||||
|
kodi_version = xbmc.getInfoLabel('System.BuildVersion')
|
||||||
|
|
||||||
|
if kodi_version and "Git:" in kodi_version and int(kodi_version.split('Git:')[1].split("-")[0]) <= 20171119:
|
||||||
|
log.info("Build does not require workaround for widgets?")
|
||||||
|
return False
|
||||||
|
|
||||||
|
''' if not xbmc.getCondVisibility('Window.IsMedia'):
|
||||||
|
log.info("Not Window.IsMedia")
|
||||||
|
|
||||||
|
if self.item['Type'] == "Audio" and not xbmc.getCondVisibility('Integer.IsGreater(Playlist.Length(music),1)'):
|
||||||
|
log.info("Audio and not playlist")
|
||||||
|
|
||||||
|
if not xbmc.getCondVisibility('Integer.IsGreater(Playlist.Length(video),1)'):
|
||||||
|
log.info("Not video playlist")
|
||||||
|
'''
|
||||||
|
|
||||||
if (not xbmc.getCondVisibility('Window.IsMedia') and
|
if (not xbmc.getCondVisibility('Window.IsMedia') and
|
||||||
((self.item['Type'] == "Audio" and not xbmc.getCondVisibility('Integer.IsGreater(Playlist.Length(music),1)')) or
|
((self.item['Type'] == "Audio" and not xbmc.getCondVisibility('Integer.IsGreater(Playlist.Length(music),1)')) or
|
||||||
not xbmc.getCondVisibility('Integer.IsGreater(Playlist.Length(video),1)'))):
|
not xbmc.getCondVisibility('Integer.IsGreater(Playlist.Length(video),1)'))):
|
||||||
|
@ -166,6 +182,7 @@ class PlaybackUtils(object):
|
||||||
url = putils.PlayUtils(intro, listitem).get_play_url()
|
url = putils.PlayUtils(intro, listitem).get_play_url()
|
||||||
log.info("Adding Intro: %s", url)
|
log.info("Adding Intro: %s", url)
|
||||||
|
|
||||||
|
PlaybackUtils(intro).set_properties(url, listitem)
|
||||||
self.set_artwork(listitem, self.item['Type'])
|
self.set_artwork(listitem, self.item['Type'])
|
||||||
self.set_listitem(listitem)
|
self.set_listitem(listitem)
|
||||||
|
|
||||||
|
|
|
@ -60,18 +60,6 @@ class UserClient(threading.Thread):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_server(cls):
|
def get_server(cls):
|
||||||
|
|
||||||
###$ Begin migration $###
|
|
||||||
if settings('server') == "":
|
|
||||||
http = "https" if settings('https') == "true" else "http"
|
|
||||||
host = settings('ipaddress')
|
|
||||||
port = settings('port')
|
|
||||||
|
|
||||||
if host and port:
|
|
||||||
settings('server', value="%s://%s:%s" % (http, host, port))
|
|
||||||
log.info("server address migration completed")
|
|
||||||
###$ End migration $###
|
|
||||||
|
|
||||||
return settings('server') or None
|
return settings('server') or None
|
||||||
|
|
||||||
def verify_server(self):
|
def verify_server(self):
|
||||||
|
|
Loading…
Reference in a new issue