* put less trust in absolute-number matches
This commit is contained in:
parent
6f5acab61f
commit
c58b3df754
|
@ -124,8 +124,11 @@ public enum EpisodeMetrics implements SimilarityMetric {
|
|||
// Match by SxE and airdate
|
||||
EpisodeIdentifier(new MetricCascade(SeasonEpisode, AirDate)),
|
||||
|
||||
// Advanced episode <-> file matching
|
||||
EpisodeFunnel(new MetricCascade(SeasonEpisode, AirDate, Title)), EpisodeBalancer(new SimilarityMetric() {
|
||||
// Advanced episode <-> file matching Lv1
|
||||
EpisodeFunnel(new MetricCascade(SeasonEpisode, AirDate, Title)),
|
||||
|
||||
// Advanced episode <-> file matching Lv2
|
||||
EpisodeBalancer(new SimilarityMetric() {
|
||||
|
||||
@Override
|
||||
public float getSimilarity(Object o1, Object o2) {
|
||||
|
|
|
@ -26,8 +26,8 @@ public class SeasonEpisodeMetric implements SimilarityMetric {
|
|||
float similarity = -1;
|
||||
for (SxE sxe1 : sxeVector1) {
|
||||
for (SxE sxe2 : sxeVector2) {
|
||||
if (sxe1.season == sxe2.season && sxe1.episode == sxe2.episode) {
|
||||
// vectors have at least one perfect episode match in common
|
||||
if (sxe1.season == sxe2.season && sxe1.episode == sxe2.episode && sxe1.season >= 0 && sxe2.season >= 0) {
|
||||
// vectors have at least one perfect episode match in common (require season >= 0 as to put less trust in single-number matches)
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue