More general grepTheTvdbId()

This commit is contained in:
Reinhard Pointner 2017-01-25 20:14:54 +08:00
parent a9cf202540
commit 86ce5e7e8c
1 changed files with 1 additions and 1 deletions

View File

@ -1276,7 +1276,7 @@ public class MediaDetection {
public static List<Integer> grepTheTvdbId(CharSequence text) {
// scan for thetvdb id patterns like http://www.thetvdb.com/?tab=series&id=78874&lid=14
Pattern tvdbUrl = Pattern.compile("\\w+://(?:\\w+[.])?thetvdb.com/[?]tab=\\w+&id=(\\d+)", Pattern.CASE_INSENSITIVE);
Pattern tvdbUrl = Pattern.compile("thetvdb.com[\\p{Graph}]*?[\\p{Punct}]id=(\\d+)", Pattern.CASE_INSENSITIVE);
return streamMatches(text, tvdbUrl, m -> m.group(1)).map(Integer::new).collect(toList());
}