* refactor to use a defined default sanity filter
This commit is contained in:
parent
1df7889af1
commit
ff95debc51
@ -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]
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user