Fix to video node refresh

This commit is contained in:
tomkat83 2017-01-20 15:46:34 +01:00
parent 45ccc3ff3f
commit 33ceb3ee33

View file

@ -65,6 +65,14 @@ class VideoNodes(object):
nodepath = tryDecode(xbmc.translatePath(
"special://profile/library/video/Plex-%s/" % dirname))
if delete:
dirs, files = xbmcvfs.listdir(tryEncode(nodepath))
for file in files:
xbmcvfs.delete(tryEncode(
(nodepath + tryDecode(file))))
log.info("Sucessfully removed videonode: %s." % tagname)
return
# Verify the video directory
# KODI BUG
# Kodi caches the result of exists for directories
@ -82,14 +90,6 @@ class VideoNodes(object):
# folder does not exist yet
log.debug('Creating folder %s' % nodepath)
xbmcvfs.mkdirs(tryEncode(nodepath))
if delete:
dirs, files = xbmcvfs.listdir(tryEncode(nodepath))
for file in files:
xbmcvfs.delete(tryEncode(
(nodepath + tryDecode(file))))
log.info("Sucessfully removed videonode: %s." % tagname)
return
# Create index entry
nodeXML = "%sindex.xml" % nodepath