utf-8 encode name and strip none utf-8 chards form device name
This commit is contained in:
@@ -256,6 +256,9 @@ class DownloadUtils():
|
||||
|
||||
settings = xbmcaddon.Addon('plugin.video.embycon')
|
||||
deviceName = settings.getSetting('deviceName')
|
||||
# remove none ascii chars
|
||||
deviceName = deviceName.decode("ascii", errors='ignore')
|
||||
# remove some chars not valid for names
|
||||
deviceName = deviceName.replace("\"", "_")
|
||||
|
||||
headers = {}
|
||||
|
||||
@@ -128,7 +128,7 @@ def checkServer(force=False, change_user=False, notify=False):
|
||||
config = user.get("Configuration")
|
||||
if (config != None):
|
||||
if (config.get("IsHidden") is None) or (config.get("IsHidden") is False):
|
||||
name = user.get("Name")
|
||||
name = user.get("Name").encode("utf-8")
|
||||
user_list.append(name)
|
||||
if (user.get("HasPassword") is True):
|
||||
secured.append(True)
|
||||
|
||||
Reference in New Issue
Block a user