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)
if delete:
files = [f for f in listdir(nodepath) if isfile(join(nodepath, f))]
for file in files:
remove(nodepath + file)
if exists_dir(nodepath):
from shutil import rmtree
rmtree(nodepath)
log.info("Sucessfully removed videonode: %s." % tagname)
return