check alternative terms if necessary and only if they're different

This commit is contained in:
Reinhard Pointner 2017-10-16 18:56:17 +02:00
parent 0dba9fe08a
commit 0251364870
1 changed files with 6 additions and 2 deletions

View File

@ -639,8 +639,12 @@ public class MediaDetection {
if (movieNameMatches.isEmpty()) {
movieNameMatches = matchMovieFromStringWithoutSpacing(terms, strict);
if (movieNameMatches.isEmpty() && !terms.equals(stripReleaseInfo(terms, true))) {
movieNameMatches = matchMovieFromStringWithoutSpacing(stripReleaseInfo(terms, true), strict);
// check alternative terms if necessary and only if they're different
if (movieNameMatches.isEmpty()) {
List<String> alternativeTerms = stripReleaseInfo(terms, true);
if (!terms.containsAll(alternativeTerms)) {
movieNameMatches = matchMovieFromStringWithoutSpacing(alternativeTerms, strict);
}
}
}