Explicitly instantiate Addon() for PKC

This commit is contained in:
croneter 2021-11-03 07:03:50 +01:00
parent 71f4fa0f76
commit 4baee9afc1
3 changed files with 3 additions and 4 deletions

View file

@ -114,7 +114,7 @@ def settings(setting, value=None):
""" """
# We need to instantiate every single time to read changed variables! # We need to instantiate every single time to read changed variables!
with SETTINGS_LOCK: with SETTINGS_LOCK:
addon = xbmcaddon.Addon() addon = xbmcaddon.Addon('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(setting, value) addon.setSetting(setting, value)

View file

@ -21,7 +21,7 @@ MARK_PLAYED_AT = 0.9
# watched? # watched?
IGNORE_SECONDS_AT_START = 60 IGNORE_SECONDS_AT_START = 60
_ADDON = Addon() _ADDON = Addon('plugin.video.plexkodiconnect')
ADDON_NAME = 'PlexKodiConnect' ADDON_NAME = 'PlexKodiConnect'
ADDON_ID = 'plugin.video.plexkodiconnect' ADDON_ID = 'plugin.video.plexkodiconnect'
ADDON_VERSION = _ADDON.getAddonInfo('version') ADDON_VERSION = _ADDON.getAddonInfo('version')

View file

@ -994,8 +994,7 @@ class WindowProperty(object):
class GlobalProperty(object): class GlobalProperty(object):
def __init__(self, prop, val='1', end=None): def __init__(self, prop, val='1', end=None):
import xbmcaddon self._addonID = 'plugin.video.plexkodiconnect'
self._addonID = xbmcaddon.Addon().getAddonInfo('id')
self.prop = prop self.prop = prop
self.val = val self.val = val
self.end = end self.end = end