fix a unicode bug, comparing unicode and none unicode strings has issues
This commit is contained in:
@@ -176,7 +176,7 @@ class DownloadUtils():
|
||||
userid = ""
|
||||
secure = False
|
||||
for user in result:
|
||||
if (user.get("Name") == userName):
|
||||
if (user.get("Name") == unicode(userName, "utf-8")):
|
||||
userid = user.get("Id")
|
||||
log.debug("Username Found: {0}", user.get("Name"))
|
||||
if (user.get("HasPassword") == True):
|
||||
|
||||
@@ -490,7 +490,6 @@ def get_next_episode(item):
|
||||
parendId = item.get("ParentId", "na")
|
||||
item_index = item.get("IndexNumber", -1)
|
||||
|
||||
|
||||
if parendId == "na":
|
||||
log.debug("No parent id, can not get next")
|
||||
return None
|
||||
|
||||
@@ -107,6 +107,7 @@ def checkServer(force=False, change_user=False, notify=False):
|
||||
|
||||
# we need to change the user
|
||||
current_username = settings.getSetting("username")
|
||||
current_username = unicode(current_username, "utf-8")
|
||||
|
||||
# if asked or we have no current user then show user selection screen
|
||||
if change_user or len(current_username) == 0:
|
||||
|
||||
Reference in New Issue
Block a user