Fix WindowsError

- Partially fixes #296
This commit is contained in:
tomkat83 2017-05-11 19:29:57 +02:00
parent fd84d97a46
commit 03a1893bdb
2 changed files with 3 additions and 4 deletions

View file

@ -211,10 +211,9 @@ class UserClient(threading.Thread):
# Get /profile/addon_data # Get /profile/addon_data
addondir = xbmc.translatePath(self.addon.getAddonInfo('profile')) addondir = xbmc.translatePath(self.addon.getAddonInfo('profile'))
hasSettings = exists("%ssettings.xml" % addondir)
# If there's no settings.xml # If there's no settings.xml
if not hasSettings: if not exists("%ssettings.xml" % addondir):
log.error("Error, no settings.xml found.") log.error("Error, no settings.xml found.")
self.auth = False self.auth = False
return False return False

View file

@ -75,14 +75,14 @@ class VideoNodes(object):
return return
# Verify the video directory # Verify the video directory
if exists_dir(path) is False: if not exists_dir(path):
copytree( copytree(
src=xbmc.translatePath("special://xbmc/system/library/video"), src=xbmc.translatePath("special://xbmc/system/library/video"),
dst=xbmc.translatePath("special://profile/library/video")) dst=xbmc.translatePath("special://profile/library/video"))
# Create the node directory # Create the node directory
if mediatype != "photos": if mediatype != "photos":
if exists_dir(nodepath) is False: if not exists_dir(nodepath):
# folder does not exist yet # folder does not exist yet
log.debug('Creating folder %s' % nodepath) log.debug('Creating folder %s' % nodepath)
mkdirs(nodepath) mkdirs(nodepath)