* some fine-tuning for the episode metrics

@see http://www.filebot.net/forums/viewtopic.php?f=6&t=972
This commit is contained in:
Reinhard Pointner 2013-09-27 08:50:41 +00:00
parent 0c7d97b939
commit b6ebdfa49f
1 changed files with 6 additions and 1 deletions

View File

@ -114,7 +114,7 @@ public enum EpisodeMetrics implements SimilarityMetric {
// don't use title for matching if title equals series name // don't use title for matching if title equals series name
String normalizedToken = normalizeObject(e.getTitle()); String normalizedToken = normalizeObject(e.getTitle());
if (normalizedToken.length() >= 3 && !normalizeObject(e.getSeriesName()).contains(normalizedToken)) { if (normalizedToken.length() >= 4 && !normalizeObject(e.getSeriesName()).contains(normalizedToken)) {
return normalizedToken; return normalizedToken;
} }
} }
@ -141,6 +141,11 @@ public enum EpisodeMetrics implements SimilarityMetric {
float sxe = EpisodeIdentifier.getSimilarity(o1, o2); float sxe = EpisodeIdentifier.getSimilarity(o1, o2);
float title = Title.getSimilarity(o1, o2); float title = Title.getSimilarity(o1, o2);
// allow title to override SxE only if series name also is a good match
if (sxe < 1 && title == 1 && SeriesName.getSimilarity(o1, o2) < 0.5f) {
title = 0;
}
// account for misleading SxE patterns in the episode title // account for misleading SxE patterns in the episode title
if (sxe < 0 && title == 1 && EpisodeIdentifier.getSimilarity(getTitle(o1), getTitle(o2)) == 1) { if (sxe < 0 && title == 1 && EpisodeIdentifier.getSimilarity(getTitle(o1), getTitle(o2)) == 1) {
sxe = 1; sxe = 1;