diff --git a/resources/lib/plexbmchelper/plexsettings.py b/resources/lib/plexbmchelper/plexsettings.py index cd289f03..3e93b01a 100644 --- a/resources/lib/plexbmchelper/plexsettings.py +++ b/resources/lib/plexbmchelper/plexsettings.py @@ -26,7 +26,7 @@ def getSettings(): options['gdm_debug'] = settings('companionGDMDebugging') options['gdm_debug'] = True if options['gdm_debug'] == 'true' else False - options['client_name'] = settings('deviceName') + options['client_name'] = v.DEVICENAME # XBMC web server options options['webserver_enabled'] = (getGUI('webserver') == "true") diff --git a/resources/lib/variables.py b/resources/lib/variables.py index 28b34278..1ed3fa9c 100644 --- a/resources/lib/variables.py +++ b/resources/lib/variables.py @@ -46,13 +46,18 @@ elif xbmc.getCondVisibility('system.platform.android'): else: PLATFORM = "Unknown" -if _ADDON.getSetting('deviceNameOpt') == "false": - # Use Kodi's deviceName - DEVICENAME = tryDecode(xbmc.getInfoLabel('System.FriendlyName')) -else: - DEVICENAME = tryDecode(_ADDON.getSetting('deviceName')) - DEVICENAME = DEVICENAME.replace("\"", "_") - DEVICENAME = DEVICENAME.replace("/", "_") +DEVICENAME = tryDecode(_ADDON.getSetting('deviceName')) +DEVICENAME = DEVICENAME.replace(":", "") +DEVICENAME = DEVICENAME.replace("/", "-") +DEVICENAME = DEVICENAME.replace("\\", "-") +DEVICENAME = DEVICENAME.replace("<", "") +DEVICENAME = DEVICENAME.replace(">", "") +DEVICENAME = DEVICENAME.replace("*", "") +DEVICENAME = DEVICENAME.replace("?", "") +DEVICENAME = DEVICENAME.replace('|', "") +DEVICENAME = DEVICENAME.replace('(', "") +DEVICENAME = DEVICENAME.replace(')', "") +DEVICENAME = DEVICENAME.strip() # Database paths _DB_VIDEO_VERSION = { diff --git a/resources/settings.xml b/resources/settings.xml index fa8348c7..b2e39d42 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -36,8 +36,7 @@ - - +