diff --git a/source/net/filebot/media/MediaDetection.java b/source/net/filebot/media/MediaDetection.java index 1838606f..0133fc53 100644 --- a/source/net/filebot/media/MediaDetection.java +++ b/source/net/filebot/media/MediaDetection.java @@ -934,11 +934,13 @@ public class MediaDetection { addUniqueQuerySet(exactMatches, normalize, Function.identity(), unique); // remove blacklisted terms and remove duplicates + List extra = stream(guessMatches).flatMap(Collection::stream).filter(t -> { + return !unique.containsKey(normalize.apply(t)); + }).collect(toList()); + Set terms = new LinkedHashSet(); - for (Collection it : guessMatches) { - terms.addAll(stripReleaseInfo(it, true)); - terms.addAll(stripReleaseInfo(it, false)); - } + terms.addAll(stripReleaseInfo(extra, true)); + terms.addAll(stripReleaseInfo(extra, false)); addUniqueQuerySet(stripBlacklistedTerms(terms), normalize, normalize, unique); return new ArrayList(unique.values());