1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 16:28:51 -05:00

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

View File

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