1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

Avoid loosing identifying information (e.g. release group in brackets)

This commit is contained in:
Reinhard Pointner 2016-04-05 18:05:57 +00:00
parent 1564efc27c
commit 8a748bbe46

View File

@ -764,8 +764,8 @@ public class MediaDetection {
public static String reduceMovieName(String name, boolean strict) throws IOException {
Matcher matcher = compile(strict ? "^(.+)[\\[\\(]((?:19|20)\\d{2})[\\]\\)]" : "^(.+?)((?:19|20)\\d{2})").matcher(name);
if (matcher.find()) {
return String.format("%s %s", normalizePunctuation(matcher.group(1)), matcher.group(2));
if (matcher.find() && parseMovieYear(matcher.group(2)).size() > 0) {
return String.format("%s %s", trimTrailingPunctuation(matcher.group(1)), matcher.group(2));
}
return null;
}