Fix direct path

By the time the initial setup went thru, the class was already loaded.
Instead, load the settings in the instance.
This commit is contained in:
angelblue05 2015-10-23 02:21:12 -05:00
parent bcee7dde76
commit dbf6a350c7
2 changed files with 12 additions and 12 deletions

View file

@ -27,13 +27,12 @@ class WriteKodiMusicDB():
kodiversion = int(xbmc.getInfoLabel("System.BuildVersion")[:2]) kodiversion = int(xbmc.getInfoLabel("System.BuildVersion")[:2])
addonName = ClientInformation().getAddonName() addonName = ClientInformation().getAddonName()
WINDOW = xbmcgui.Window(10000)
username = WINDOW.getProperty('currUser') def __init__(self):
userid = WINDOW.getProperty('userId%s' % username)
server = WINDOW.getProperty('server%s' % username) username = utils.window('currUser')
self.userid = utils.window('userId%s' % username)
directpath = utils.settings('useDirectPaths') == "true" self.server = utils.window('server%s' % username)
def logMsg(self, msg, lvl = 1): def logMsg(self, msg, lvl = 1):

View file

@ -27,13 +27,14 @@ class WriteKodiVideoDB():
kodiversion = int(xbmc.getInfoLabel("System.BuildVersion")[:2]) kodiversion = int(xbmc.getInfoLabel("System.BuildVersion")[:2])
addonName = ClientInformation().getAddonName() addonName = ClientInformation().getAddonName()
WINDOW = xbmcgui.Window(10000)
def __init__(self):
username = WINDOW.getProperty('currUser') username = utils.window('currUser')
userid = WINDOW.getProperty('userId%s' % username) self.userid = utils.window('userId%s' % username)
server = WINDOW.getProperty('server%s' % username) self.server = utils.window('server%s' % username)
directpath = utils.settings('useDirectPaths') == "true" self.directpath = utils.settings('useDirectPaths') == "true"
def logMsg(self, msg, lvl = 1): def logMsg(self, msg, lvl = 1):