Fix to video node refresh
This commit is contained in:
parent
45ccc3ff3f
commit
33ceb3ee33
1 changed files with 9 additions and 9 deletions
|
@ -59,12 +59,20 @@ class VideoNodes(object):
|
||||||
dirname = "%s-%s" % (viewid, mediatype)
|
dirname = "%s-%s" % (viewid, mediatype)
|
||||||
else:
|
else:
|
||||||
dirname = viewid
|
dirname = viewid
|
||||||
|
|
||||||
path = tryDecode(xbmc.translatePath(
|
path = tryDecode(xbmc.translatePath(
|
||||||
"special://profile/library/video/"))
|
"special://profile/library/video/"))
|
||||||
nodepath = tryDecode(xbmc.translatePath(
|
nodepath = tryDecode(xbmc.translatePath(
|
||||||
"special://profile/library/video/Plex-%s/" % dirname))
|
"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
|
# Verify the video directory
|
||||||
# KODI BUG
|
# KODI BUG
|
||||||
# Kodi caches the result of exists for directories
|
# Kodi caches the result of exists for directories
|
||||||
|
@ -82,14 +90,6 @@ class VideoNodes(object):
|
||||||
# folder does not exist yet
|
# folder does not exist yet
|
||||||
log.debug('Creating folder %s' % nodepath)
|
log.debug('Creating folder %s' % nodepath)
|
||||||
xbmcvfs.mkdirs(tryEncode(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
|
# Create index entry
|
||||||
nodeXML = "%sindex.xml" % nodepath
|
nodeXML = "%sindex.xml" % nodepath
|
||||||
|
|
Loading…
Reference in a new issue