1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 08:18:52 -05:00

* fix video support in imdb scraper

This commit is contained in:
Reinhard Pointner 2013-02-22 17:26:34 +00:00
parent 46de54e213
commit de9d326eb0
2 changed files with 11 additions and 1 deletions

View File

@ -112,7 +112,7 @@ public class IMDbClient implements MovieIdentificationService {
int imdbid = getImdbId(selectString("//LINK[@rel='canonical']/@href", dom));
String title = selectString("//META[@property='og:title']/@content", dom);
Matcher titleMatcher = Pattern.compile("(.+)\\s\\((?i:TV\\s)?(\\d{4})\\)$").matcher(title);
Matcher titleMatcher = Pattern.compile("(.+)\\s\\((?i:tv.|video.)?(\\d{4})\\)$").matcher(title);
if (!titleMatcher.matches())
return null;

View File

@ -133,6 +133,16 @@ public class IMDbClientTest {
}
@Test
public void getMovieDescriptor5() throws Exception {
Movie movie = imdb.getMovieDescriptor(1020960, null);
assertEquals("God, the Universe and Everything Else", movie.getName());
assertEquals(1988, movie.getYear());
assertEquals(1020960, movie.getImdbId(), 0);
}
@Test
public void getAkaMovieDescriptor() throws Exception {
Movie movie = imdb.getMovieDescriptor(106559, Locale.ENGLISH);