I've found a minor bug. I organize my artwork into my skin directory so xbmc doesn't cache everything, but the _delete_directories subroutine fails when using special://skin/_fanart/. When using the full path, /storage/.xbmc/addons/skin.aeon.nox/_fanart/, it works just fine.
I thought it was me at first, since I've modified the default.py on order to organize my fanart into multiple folders based upon different network folders (tvshowfanart is split up into anime and tvshows for instance), but since it doesn't happen for other parts of artwork organizer, it had to be something else.
I'm also wondering why the _delete_directories enumerates files before deleting them. why not delete the main folder in one go since the next routine in the script is _create_directories?
Code:
def _delete_directories( self ):
if xbmcvfs.exists( self.directory ):
dirs, files = xbmcvfs.listdir( self.directory )
for item in dirs:
try:
shutil.rmtree( os.path.join(self.directory, item) )
except:
pass
instead of
Code:
def _delete_directories( self ):
try:
shutil.rmtree( self.directory )
except:
pass
something like that, but working, since this doesn't work