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
addondir = xbmc.translatePath(self.addon.getAddonInfo('profile'))
hasSettings = exists("%ssettings.xml" % addondir)
# If there's no settings.xml
if not hasSettings:
if not exists("%ssettings.xml" % addondir):
log.error("Error, no settings.xml found.")
self.auth = False
return False

View File

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