mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-15 13:55:03 -05:00
* improved subtitle auto-detection
This commit is contained in:
parent
d851e941c9
commit
3f6487b621
@ -590,7 +590,7 @@ public class MediaDetection {
|
||||
}
|
||||
|
||||
|
||||
private static SimilarityMetric getMovieMatchMetric() {
|
||||
public static SimilarityMetric getMovieMatchMetric() {
|
||||
return new MetricAvg(new SequenceMatchSimilarity(), new NameSimilarityMetric(), new SequenceMatchSimilarity(0, true), new NumericSimilarityMetric() {
|
||||
|
||||
private Pattern year = Pattern.compile("\\b\\d{4}\\b");
|
||||
|
@ -61,7 +61,7 @@ public final class SubtitleUtilities {
|
||||
return f < 1 ? -1 : 1;
|
||||
}
|
||||
};
|
||||
SimilarityMetric sanity = new MetricCascade(absoluteSeasonEpisode, AirDate, new MetricAvg(NameSubstringSequence, Name));
|
||||
SimilarityMetric sanity = new MetricCascade(absoluteSeasonEpisode, AirDate, new MetricAvg(NameSubstringSequence, Name), getMovieMatchMetric());
|
||||
|
||||
// first match everything as best as possible, then filter possibly bad matches
|
||||
Matcher<File, SubtitleDescriptor> matcher = new Matcher<File, SubtitleDescriptor>(files, subtitles, false, metrics);
|
||||
|
Loading…
Reference in New Issue
Block a user