* cache compiled patterns

This commit is contained in:
Reinhard Pointner 2013-11-27 19:19:01 +00:00
parent 9e41373f43
commit ccfe94f49b
1 changed files with 4 additions and 1 deletions

View File

@ -111,8 +111,11 @@ public class MediaDetection {
return releaseInfo.getLanguageSuffix(getName(file));
}
private static final SeasonEpisodeMatcher seasonEpisodeMatcherStrict = new SeasonEpisodeMatcherWithFilter(true);
private static final SeasonEpisodeMatcher seasonEpisodeMatcherNonStrict = new SeasonEpisodeMatcherWithFilter(false);
public static SeasonEpisodeMatcher getSeasonEpisodeMatcher(boolean strict) {
return new SeasonEpisodeMatcherWithFilter(strict);
return strict ? seasonEpisodeMatcherStrict : seasonEpisodeMatcherNonStrict;
}
public static boolean isEpisode(String name, boolean strict) {