From e5dc94afa94aa4dfe9c49c336ceb834afcf2fe27 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 12 Aug 2016 00:30:21 +0800 Subject: [PATCH] If time stamps are too far apart then similarity must be 0 --- source/net/filebot/similarity/TimeStampMetric.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net/filebot/similarity/TimeStampMetric.java b/source/net/filebot/similarity/TimeStampMetric.java index 96c18eb7..30aa82b6 100644 --- a/source/net/filebot/similarity/TimeStampMetric.java +++ b/source/net/filebot/similarity/TimeStampMetric.java @@ -22,7 +22,7 @@ public class TimeStampMetric implements SimilarityMetric { if (t1 > 0 && t2 > 0) { float delta = Math.abs(t1 - t2); - return delta > epoch ? 1 : 1 - (delta / epoch); + return delta > epoch ? 0 : 1 - (delta / epoch); } return -1;