filebot/website/data/shell/subcpl.groovy

17 lines
467 B
Groovy
Raw Normal View History

2011-11-25 19:43:24 +00:00
// 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 ->
2011-11-25 19:58:26 +00:00
sub.isSubtitle() && sub.isDerived(video)
2011-11-25 19:43:24 +00:00
}
}
// fetch subtitles by hash only
getSubtitles(file:videos, strict:true)
}