Fix playlist/videonodes deletion

Using the view Id instead of actual name for folder creation, to prevent
deletion error (due to folder containing special characters).
This commit is contained in:
angelblue05 2016-02-23 18:40:13 -06:00
parent dc74bf42aa
commit f394dc39dc

View file

@ -516,7 +516,13 @@ def deleteNodes():
dirs, files = xbmcvfs.listdir(path)
for dir in dirs:
if dir.decode('utf-8').startswith('Emby'):
try:
shutil.rmtree("%s%s" % (path, dir.decode('utf-8')))
except:
logMsg("EMBY", "Failed to delete directory: %s" % dir.decode('utf-8'))
for file in files:
if file.decode('utf-8').startswith('emby'):
try:
xbmcvfs.delete("%s%s" % (path, file.decode('utf-8')))
except:
logMsg("EMBY", "Failed to file: %s" % file.decode('utf-8'))