Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def osdb = net.sourceforge.filebot.WebServices.OpenSubtitles
- def query = 'firefly'
- def language = 'English'
- def options = osdb.search(query)
- println "Fetching subtitles for '${options[0]}'"
- def subs = osdb.getSubtitleList(options[0], language)
- println "Found ${subs.size()} subtitles"
- def selection = subs.findAll{ it.languageName =~ language && parseEpisodeNumber(it.name) != null }.groupBy{ parseEpisodeNumber(it.name) }.values()*.get(0)
- println "Selected ${selection.size()} subtitles"
- selection.each{
- println it.fetch().saveAs(it.path)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement