Fix WindowsError or alike when deleting video nodes
This commit is contained in:
parent
b532b74b84
commit
209cd78315
1 changed files with 4 additions and 4 deletions
|
@ -68,10 +68,10 @@ 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
|
||||||
|
|
||||||
# Verify the video directory
|
# Verify the video directory
|
||||||
|
|
Loading…
Reference in a new issue