1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-22 15:58:52 -05:00

Support for 8-digit Movie IDs

This commit is contained in:
Reinhard Pointner 2019-05-03 19:39:32 +07:00
parent f63c3fe13c
commit d72b7f490d
2 changed files with 2 additions and 2 deletions

View File

@ -1279,7 +1279,7 @@ public class MediaDetection {
public static List<Integer> grepImdbId(CharSequence text) {
// scan for imdb id patterns like tt1234567
Pattern imdbId = Pattern.compile("(?<!\\p{Alnum})tt(\\d{7})(?!\\p{Alnum})", Pattern.CASE_INSENSITIVE);
Pattern imdbId = Pattern.compile("(?<!\\p{Alnum})tt(\\d{7,8})(?!\\p{Alnum})", Pattern.CASE_INSENSITIVE);
return streamMatches(text, imdbId, m -> m.group(1)).map(Integer::parseInt).collect(toList());
}

View File

@ -56,7 +56,7 @@ public class OMDbClient implements MovieIdentificationService {
}
protected int getImdbId(String link) {
Matcher matcher = Pattern.compile("tt(\\d{7})").matcher(link);
Matcher matcher = Pattern.compile("tt(\\d{7,8})").matcher(link);
if (matcher.find()) {
return Integer.parseInt(matcher.group(1));