Fix not updating new user settings

This commit is contained in:
tomkat83 2016-10-31 19:42:52 +01:00
parent 5508246a43
commit 02e8e3bf5c

View file

@ -60,12 +60,14 @@ def settings(setting, value=None):
setting and value can either be unicode or string setting and value can either be unicode or string
""" """
# We need to instantiate every single time to read changed variables!
addon = xbmcaddon.Addon(id='plugin.video.plexkodiconnect')
if value is not None: if value is not None:
# Takes string or unicode by default! # Takes string or unicode by default!
ADDON.setSetting(tryEncode(setting), tryEncode(value)) addon.setSetting(tryEncode(setting), tryEncode(value))
else: else:
# Should return unicode by default, but just in case # Should return unicode by default, but just in case
return tryDecode(ADDON.getSetting(setting)) return tryDecode(addon.getSetting(setting))
def language(stringid): def language(stringid):