* 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:
parent
95494f28eb
commit
0c872a44d0
|
@ -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) } }
|
||||
|
|
Loading…
Reference in New Issue