* refactor to use a defined default sanity filter

This commit is contained in:
Reinhard Pointner 2012-02-20 03:16:42 +00:00
parent 1df7889af1
commit ff95debc51
3 changed files with 4 additions and 3 deletions

View File

@ -152,7 +152,7 @@ import net.sourceforge.filebot.similarity.*
def parseEpisodeNumber(path, strict = true) {
def input = path instanceof File ? path.name : path.toString()
def sxe = new SeasonEpisodeMatcher(new SeasonEpisodeMatcher.SeasonEpisodeFilter(30, 50, 1000), strict).match(input)
def sxe = new SeasonEpisodeMatcher(SeasonEpisodeMatcher.DEFAULT_SANITY, strict).match(input)
return sxe == null || sxe.isEmpty() ? null : sxe[0]
}

View File

@ -16,6 +16,8 @@ import java.util.regex.Pattern;
public class SeasonEpisodeMatcher {
public static final SeasonEpisodeFilter DEFAULT_SANITY = new SeasonEpisodeFilter(50, 50, -1);
private SeasonEpisodePattern[] patterns;

View File

@ -23,14 +23,13 @@ import java.util.TreeMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import net.sourceforge.filebot.similarity.SeasonEpisodeMatcher.SeasonEpisodeFilter;
import net.sourceforge.filebot.similarity.SeasonEpisodeMatcher.SxE;
import net.sourceforge.tuned.FileUtilities;
public class SeriesNameMatcher {
protected SeasonEpisodeMatcher seasonEpisodeMatcher = new SeasonEpisodeMatcher(new SeasonEpisodeFilter(30, 50, -1), true);
protected SeasonEpisodeMatcher seasonEpisodeMatcher = new SeasonEpisodeMatcher(SeasonEpisodeMatcher.DEFAULT_SANITY, true);
protected DateMatcher dateMatcher = new DateMatcher();
protected NameSimilarityMetric nameSimilarityMetric = new NameSimilarityMetric();