Detect coreelect, etc

This commit is contained in:
angelblue05 2018-11-02 16:26:29 -05:00
parent b873f516b3
commit 05483c7406
3 changed files with 10 additions and 4 deletions

View file

@ -32,6 +32,12 @@ def get_platform():
if xbmc.getCondVisibility('system.platform.osx'): if xbmc.getCondVisibility('system.platform.osx'):
return "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'): elif xbmc.getCondVisibility('system.platform.atv2'):
return "ATV2" return "ATV2"
elif xbmc.getCondVisibility('system.platform.ios'): elif xbmc.getCondVisibility('system.platform.ios'):

View file

@ -55,16 +55,17 @@ class Service(xbmc.Monitor):
self.settings['kodi_companion'] = settings('kodiCompanion.bool') self.settings['kodi_companion'] = settings('kodiCompanion.bool')
window('emby_logLevel', value=str(self.settings['log_level'])) window('emby_logLevel', value=str(self.settings['log_level']))
window('emby_kodiProfile', value=self.settings['profile']) window('emby_kodiProfile', value=self.settings['profile'])
settings('platformDetected', client.get_platform())
if self.settings['enable_context']: if self.settings['enable_context']:
window('emby_context', value="true") window('emby_context.bool', True)
if self.settings['enable_context_transcode']: 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("--->>>[ %s ]", client.get_addon_name())
LOG.warn("Version: %s", client.get_version()) LOG.warn("Version: %s", client.get_version())
LOG.warn("KODI Version: %s", xbmc.getInfoLabel('System.BuildVersion')) 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("Python Version: %s", sys.version)
LOG.warn("Using dynamic paths: %s", settings('useDirectPaths') == "0") LOG.warn("Using dynamic paths: %s", settings('useDirectPaths') == "0")
LOG.warn("Log Level: %s", self.settings['log_level']) LOG.warn("Log Level: %s", self.settings['log_level'])

View file

@ -400,7 +400,6 @@ class Monitor(xbmc.Monitor):
else: else:
builtin = { builtin = {
'ToggleFullscreen': 'Action(FullScreen)', 'ToggleFullscreen': 'Action(FullScreen)',
'ToggleOsdMenu': 'Action(OSD)', 'ToggleOsdMenu': 'Action(OSD)',
'ToggleContextMenu': 'Action(ContextMenu)', 'ToggleContextMenu': 'Action(ContextMenu)',