From 05483c7406528498ebfa0c529d30285b03bb7beb Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Fri, 2 Nov 2018 16:26:29 -0500 Subject: [PATCH] Detect coreelect, etc --- resources/lib/client.py | 6 ++++++ resources/lib/entrypoint/service.py | 7 ++++--- resources/lib/monitor.py | 1 - 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/resources/lib/client.py b/resources/lib/client.py index ec0ba116..8f523448 100644 --- a/resources/lib/client.py +++ b/resources/lib/client.py @@ -32,6 +32,12 @@ def get_platform(): if xbmc.getCondVisibility('system.platform.osx'): return "OSX" + elif xbmc.getCondVisibility('System.HasAddon(service.coreelec.settings)'): + return "CoreElec" + elif xbmc.getCondVisibility('System.HasAddon(service.libreelec.settings)'): + return "LibreElec" + elif xbmc.getCondVisibility('System.HasAddon(service.osmc.settings)'): + return "OSMC" elif xbmc.getCondVisibility('system.platform.atv2'): return "ATV2" elif xbmc.getCondVisibility('system.platform.ios'): diff --git a/resources/lib/entrypoint/service.py b/resources/lib/entrypoint/service.py index 53e2ec45..8b105ee7 100644 --- a/resources/lib/entrypoint/service.py +++ b/resources/lib/entrypoint/service.py @@ -55,16 +55,17 @@ class Service(xbmc.Monitor): self.settings['kodi_companion'] = settings('kodiCompanion.bool') window('emby_logLevel', value=str(self.settings['log_level'])) window('emby_kodiProfile', value=self.settings['profile']) + settings('platformDetected', client.get_platform()) if self.settings['enable_context']: - window('emby_context', value="true") + window('emby_context.bool', True) if self.settings['enable_context_transcode']: - window('emby_context_transcode', value="true") + window('emby_context_transcode.bool', True) LOG.warn("--->>>[ %s ]", client.get_addon_name()) LOG.warn("Version: %s", client.get_version()) LOG.warn("KODI Version: %s", xbmc.getInfoLabel('System.BuildVersion')) - LOG.warn("Platform: %s", client.get_platform()) + LOG.warn("Platform: %s", settings('platformDetected')) LOG.warn("Python Version: %s", sys.version) LOG.warn("Using dynamic paths: %s", settings('useDirectPaths') == "0") LOG.warn("Log Level: %s", self.settings['log_level']) diff --git a/resources/lib/monitor.py b/resources/lib/monitor.py index b742361e..ba9f15ad 100644 --- a/resources/lib/monitor.py +++ b/resources/lib/monitor.py @@ -400,7 +400,6 @@ class Monitor(xbmc.Monitor): else: builtin = { - 'ToggleFullscreen': 'Action(FullScreen)', 'ToggleOsdMenu': 'Action(OSD)', 'ToggleContextMenu': 'Action(ContextMenu)',