diff --git a/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy b/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy index adf03765..0dd6e709 100644 --- a/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy +++ b/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy @@ -169,11 +169,16 @@ def detectSeriesName(files, locale = Locale.ENGLISH) { return names == null || names.isEmpty() ? null : names.toList()[0] } -def detectMovie(movieFile, strict = true, locale = Locale.ENGLISH) { - def movies = MediaDetection.detectMovie(movieFile, OpenSubtitles, TheMovieDB, locale, strict) +def detectMovie(movieFile, strict = true, locale = Locale.ENGLISH, hashLookupService = OpenSubtitles, queryLookupService = TheMovieDB) { + def movies = MediaDetection.detectMovie(movieFile, hashLookupService, queryLookupService, locale, strict) return movies == null || movies.isEmpty() ? null : movies.toList()[0] } +def matchMovie(movieFile, strict = false) { // same as detectMovie() using only the local movie index making it VERY FAST + return detectMovie(movieFile, strict, Locale.ENGLISH, null, null) +} + + def similarity(o1, o2) { return new NameSimilarityMetric().getSimilarity(o1, o2) } diff --git a/source/net/sourceforge/filebot/similarity/SeasonEpisodeMatcher.java b/source/net/sourceforge/filebot/similarity/SeasonEpisodeMatcher.java index 0c37fae2..a1b3747b 100644 --- a/source/net/sourceforge/filebot/similarity/SeasonEpisodeMatcher.java +++ b/source/net/sourceforge/filebot/similarity/SeasonEpisodeMatcher.java @@ -29,7 +29,7 @@ public class SeasonEpisodeMatcher { patterns[0] = new SeasonEpisodePattern(null, "(? process(MatchResult match) { @@ -57,7 +57,7 @@ public class SeasonEpisodeMatcher { }; // match patterns like ep1, ep.1, ... - patterns[3] = new SeasonEpisodePattern(sanity, "(? process(MatchResult match) {