From 4baee9afc169ea58e04169426843b5859486a8ee Mon Sep 17 00:00:00 2001 From: croneter Date: Wed, 3 Nov 2021 07:03:50 +0100 Subject: [PATCH] Explicitly instantiate Addon() for PKC --- resources/lib/utils.py | 2 +- resources/lib/variables.py | 2 +- resources/lib/windows/kodigui.py | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/lib/utils.py b/resources/lib/utils.py index 11db93c0..4a88e768 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -114,7 +114,7 @@ def settings(setting, value=None): """ # We need to instantiate every single time to read changed variables! with SETTINGS_LOCK: - addon = xbmcaddon.Addon() + addon = xbmcaddon.Addon('plugin.video.plexkodiconnect') if value is not None: # Takes string or unicode by default! addon.setSetting(setting, value) diff --git a/resources/lib/variables.py b/resources/lib/variables.py index 8174c5ea..4da35055 100644 --- a/resources/lib/variables.py +++ b/resources/lib/variables.py @@ -21,7 +21,7 @@ MARK_PLAYED_AT = 0.9 # watched? IGNORE_SECONDS_AT_START = 60 -_ADDON = Addon() +_ADDON = Addon('plugin.video.plexkodiconnect') ADDON_NAME = 'PlexKodiConnect' ADDON_ID = 'plugin.video.plexkodiconnect' ADDON_VERSION = _ADDON.getAddonInfo('version') diff --git a/resources/lib/windows/kodigui.py b/resources/lib/windows/kodigui.py index 358ce98a..e860dd2e 100644 --- a/resources/lib/windows/kodigui.py +++ b/resources/lib/windows/kodigui.py @@ -994,8 +994,7 @@ class WindowProperty(object): class GlobalProperty(object): def __init__(self, prop, val='1', end=None): - import xbmcaddon - self._addonID = xbmcaddon.Addon().getAddonInfo('id') + self._addonID = 'plugin.video.plexkodiconnect' self.prop = prop self.val = val self.end = end