filebot/website/data/shell/subcpl.groovy
2011-11-25 19:58:26 +00:00

17 lines
467 B
Groovy

// filebot -script "http://filebot.sourceforge.net/data/shell/subcpl.groovy" <options> <folder>
/*
* Fetch subtitles for all videos that currently don't have subtitles
*/
args.eachMediaFolder { dir ->
// select videos without subtitles
def videos = dir.listFiles().findAll{ video ->
video.isVideo() && !dir.listFiles().find{ sub ->
sub.isSubtitle() && sub.isDerived(video)
}
}
// fetch subtitles by hash only
getSubtitles(file:videos, strict:true)
}