Fix WindowsError or alike when deleting video nodes

This commit is contained in:
tomkat83 2017-05-17 14:42:28 +02:00
parent b532b74b84
commit 209cd78315

View file

@ -68,9 +68,9 @@ class VideoNodes(object):
"special://profile/library/video/Plex-%s/" % dirname) "special://profile/library/video/Plex-%s/" % dirname)
if delete: if delete:
files = [f for f in listdir(nodepath) if isfile(join(nodepath, f))] if exists_dir(nodepath):
for file in files: from shutil import rmtree
remove(nodepath + file) rmtree(nodepath)
log.info("Sucessfully removed videonode: %s." % tagname) log.info("Sucessfully removed videonode: %s." % tagname)
return return