rednoah, i have a simple script that does "args.eachMediaFolder { dir -> println "Listing $dir" } ... but it only lists the first folder ???
i'm running the portable version doing ./filebot.sh -script "scrape.groovy" -trust-script "/Volumes/Storage/Output"
any ideas what could be the problem ?
eachMediaFolder retrieves only one folder
Re: eachMediaFolder retrieves only one folder
well, now i know why ... after browsing over filebot's source code, i found that eachMediaFolder only returns folders that have files of "video" type.
How can i customize the list of video types ?
How can i customize the list of video types ?
Re: eachMediaFolder retrieves only one folder
What video filetypes are still missing? It's media.types in the jar. You can just do getFolders().findAll{...} and do what you wanna do.
e.g.
or like this?
e.g.
Code: Select all
args.getFolders{ it.hasFile{ it.hasExtension('avi', 'mkv') } }.each { dir ->
println dir
}
Code: Select all
def selection = args.getFiles{ it.hasExtension('avi', 'mkv') }
selection.mapByFolder().each { dir, fs ->
println "$dir: $fs"
}
Please read the FAQ and How to Request Help.