How can I tweak sorty.groovy to download media artwork?
Posted: 20 May 2014, 00:55
I have installed filebot portable on a ReadyNas 104 following the RedNoah's post on how to install FileBot on anything (thank you!) and it's working great. I have got the sorty.groovy example script working to rename and move incoming media to the right folders, and get the subtitles.
The one thing I'd like to do here is to have it also download the artwork. I have run this
And it goes great, but can I run the equivalent on one directory only (or per directory) in the sorty.groovy, rather than recurse the whole library after each batch run? I think that will be quicker (eventually), depending on how many folders are in the new movies folder?
In the sorty script, I am not sure if I should run the script before or after the rename function, could someone please give me the best way here? I'm not sure how to get the new folder name after the rename has occurred, to pass to the fn:artwork (or is there a better way).
This is from sorty
Thanks for filebot RedNoah, it's really great.
The one thing I'd like to do here is to have it also download the artwork. I have run this
Code: Select all
filebot -script fn:artwork.tmdb '/data/Video/_New Movies/'
In the sorty script, I am not sure if I should run the script before or after the rename function, could someone please give me the best way here? I'm not sure how to get the new folder name after the rename has occurred, to pass to the fn:artwork (or is there a better way).
This is from sorty
Code: Select all
movieDir.getFolders{ !it.hasFile{ incomplete(it) } && it.hasFile{ it.isVideo() } }.each{ dir ->
println "Processing $dir"
def files = dir.listFiles{ it.isVideo() }
// fetch subtitles
files += getSubtitles(file:files)
// sort movies / subtitles
rename(file:files, db:'TheMovieDB', format:movieFormat)
//IS THIS THE BEST PLACE TO RUN THE ART DOWNLOAD SCRIPT? HOW CAN I GET THE NEW FOLDER NAME TO PASS TO IT?
//filebot -script fn:artwork.tmdb NEW_FOLDER_NAME_HERE?
}