From 8a6518fd2d7b39aaed54c970b3bda3f9b8d73259 Mon Sep 17 00:00:00 2001 From: Rob Weber Date: Mon, 23 Jan 2017 11:34:35 -0600 Subject: [PATCH] encode setting value as utf string --- resources/lib/guisettings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/guisettings.py b/resources/lib/guisettings.py index e68a63a..ab49c66 100644 --- a/resources/lib/guisettings.py +++ b/resources/lib/guisettings.py @@ -44,7 +44,7 @@ class GuiSettingsManager: if(aSetting.value.isdigit() or (aSetting.value == 'true' or aSetting.value == 'false')): xbmc.executeJSONRPC('{"jsonrpc":"2.0", "id":1, "method":"Settings.SetSettingValue","params":{"setting":"' + aSetting.json_name() + '","value":' + aSetting.value + '}}') else: - xbmc.executeJSONRPC('{"jsonrpc":"2.0", "id":1, "method":"Settings.SetSettingValue","params":{"setting":"' + aSetting.json_name() + '","value":"' + aSetting.value + '"}}') + xbmc.executeJSONRPC('{"jsonrpc":"2.0", "id":1, "method":"Settings.SetSettingValue","params":{"setting":"' + aSetting.json_name() + '","value":"' + utils.encode(aSetting.value) + '"}}') #make a copy of the guisettings file to make user based restores easier xbmcvfs.copy(self.settingsFile, xbmc.translatePath("special://home/userdata/guisettings.xml.restored")) @@ -96,4 +96,4 @@ class SettingNode: def json_name(self): return self.parent + "." + self.name - \ No newline at end of file +