From 3caa2ae3a70a2b9da612ad9417c26bb6a16251d6 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Thu, 21 Jan 2016 19:19:25 -0600 Subject: [PATCH] Re-add decode to unicode Then convert to utf-8, then ascii for the auth header. --- resources/lib/clientinfo.py | 3 +-- resources/lib/downloadutils.py | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/clientinfo.py b/resources/lib/clientinfo.py index 4479d8b9..44ed98f2 100644 --- a/resources/lib/clientinfo.py +++ b/resources/lib/clientinfo.py @@ -44,8 +44,7 @@ class ClientInfo(): if utils.settings('deviceNameOpt') == "false": # Use Kodi's deviceName - deviceName = xbmc.getInfoLabel('System.FriendlyName') - deviceName = utils.normalize_string(deviceName) + deviceName = xbmc.getInfoLabel('System.FriendlyName').decode('utf-8') else: deviceName = utils.settings('deviceName') deviceName = deviceName.replace("\"", "_") diff --git a/resources/lib/downloadutils.py b/resources/lib/downloadutils.py index 1c244e74..0a1e0e28 100644 --- a/resources/lib/downloadutils.py +++ b/resources/lib/downloadutils.py @@ -182,6 +182,7 @@ class DownloadUtils(): clientInfo = self.clientInfo deviceName = clientInfo.getDeviceName() + deviceName = utils.normalize_string(deviceName.encode('utf-8')) deviceId = clientInfo.getDeviceId() version = clientInfo.getVersion()