1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 08:18:52 -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()) {
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);
}
}
}