From 3c9785073fd771ce6313114a49eb6ed71b41109a Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Fri, 2 Mar 2018 21:05:05 -0600 Subject: [PATCH] Update playbackutils Seems a slightly later date build of krypton doesn't need the workaround for widgets. --- resources/lib/playbackutils.py | 17 +++++++++++++++++ resources/lib/userclient.py | 12 ------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/resources/lib/playbackutils.py b/resources/lib/playbackutils.py index 41b173c8..1a5275fb 100644 --- a/resources/lib/playbackutils.py +++ b/resources/lib/playbackutils.py @@ -54,6 +54,22 @@ class PlaybackUtils(object): 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 ((self.item['Type'] == "Audio" and not xbmc.getCondVisibility('Integer.IsGreater(Playlist.Length(music),1)')) or not xbmc.getCondVisibility('Integer.IsGreater(Playlist.Length(video),1)'))): @@ -166,6 +182,7 @@ class PlaybackUtils(object): url = putils.PlayUtils(intro, listitem).get_play_url() log.info("Adding Intro: %s", url) + PlaybackUtils(intro).set_properties(url, listitem) self.set_artwork(listitem, self.item['Type']) self.set_listitem(listitem) diff --git a/resources/lib/userclient.py b/resources/lib/userclient.py index 17b7fcd9..0775d036 100644 --- a/resources/lib/userclient.py +++ b/resources/lib/userclient.py @@ -60,18 +60,6 @@ class UserClient(threading.Thread): @classmethod 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 def verify_server(self):