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!
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)

View file

@ -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')

View file

@ -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