1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-24 08:48:51 -05:00

* don't scrape tv shows / video games / etc as movie

This commit is contained in:
Reinhard Pointner 2012-02-18 09:49:57 +00:00
parent 3c8d6b5395
commit b1090606a4

View File

@ -74,7 +74,7 @@ public class IMDbClient implements MovieIdentificationService {
String year = node.getNextSibling().getTextContent().replaceAll("[\\p{Punct}\\p{Space}]+", ""); // remove non-number characters
String href = getAttribute("href", node);
results.add(new Movie(name, Pattern.matches("\\d{4}", year) ? Integer.parseInt(year) : -1, getImdbId(href)));
results.add(new Movie(name, Integer.parseInt(year), getImdbId(href)));
} catch (Exception e) {
// ignore illegal movies (TV Shows, Videos, Video Games, etc)
}