mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-22 07:48:52 -05:00
Support for 8-digit Movie IDs
This commit is contained in:
parent
f63c3fe13c
commit
d72b7f490d
@ -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());
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user