From 70c22e2cdb390ac02ee89ceb280f037a5e845c2f Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 27 Feb 2014 19:48:31 +0000 Subject: [PATCH] * fine-tune subtitles exclusion logic --- .../net/sourceforge/filebot/similarity/EpisodeMetrics.java | 5 +++-- .../net/sourceforge/filebot/subtitle/SubtitleUtilities.java | 2 +- website/data/query-blacklist.txt | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/net/sourceforge/filebot/similarity/EpisodeMetrics.java b/source/net/sourceforge/filebot/similarity/EpisodeMetrics.java index 37e51767..eba8ab2a 100644 --- a/source/net/sourceforge/filebot/similarity/EpisodeMetrics.java +++ b/source/net/sourceforge/filebot/similarity/EpisodeMetrics.java @@ -125,10 +125,11 @@ public enum EpisodeMetrics implements SimilarityMetric { } if (object instanceof Movie) { - object = ((Movie) object).getName(); + return normalizeObject(((Movie) object).getName()); } - return normalizeObject(object); + String s = normalizeObject(object); + return s.length() >= 4 ? s : null; // only consider long enough strings to avoid false matches } }), diff --git a/source/net/sourceforge/filebot/subtitle/SubtitleUtilities.java b/source/net/sourceforge/filebot/subtitle/SubtitleUtilities.java index 5f579d22..590b6f38 100644 --- a/source/net/sourceforge/filebot/subtitle/SubtitleUtilities.java +++ b/source/net/sourceforge/filebot/subtitle/SubtitleUtilities.java @@ -127,7 +127,7 @@ public final class SubtitleUtilities { continue; // ignore if we're sure that SxE is a negative match - if (isEpisode(it.getName(), true) && isEpisode(file.getPath(), true) && EpisodeMetrics.EpisodeFunnel.getSimilarity(file, it) < 1) + if ((isEpisode(it.getName(), true) || isEpisode(file.getPath(), true)) && EpisodeMetrics.EpisodeIdentifier.getSimilarity(file, it) < 1) continue; // ignore if it's not similar enough diff --git a/website/data/query-blacklist.txt b/website/data/query-blacklist.txt index 05655013..1e00e810 100644 --- a/website/data/query-blacklist.txt +++ b/website/data/query-blacklist.txt @@ -41,6 +41,7 @@ ^Download$ ^Downloading$ ^Downloads$ +^Dropbox$ ^Entertainment$ ^Episode$ ^Episodes$