* keep cleaner from messing with season structures and anything else where there's artwork in root folders but videos only in subfolders

@see http://www.filebot.net/forums/viewtopic.php?f=6&t=762&p=4927#p4927
This commit is contained in:
Reinhard Pointner 2013-06-15 10:00:03 +00:00
parent 95494f28eb
commit 0c872a44d0
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ def clean(f) {
// delete clutter files in orphaned media folders
args.getFiles{ isClutter(it) && !it.dir.hasFile{ (it.isVideo() || it.isAudio()) && !isClutter(it) }}.each { clean(it) }
args.getFiles{ isClutter(it) && !it.dir.getFiles().find{ (it.isVideo() || it.isAudio()) && !isClutter(it) }}.each { clean(it) }
// delete empty folders but exclude given args
args.getFolders().sort().reverse().each { if (it.listFiles().length == 0) { if (deleteRootFolder || !args.contains(it)) clean(it) } }