1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-01-11 05:48:01 -05:00

* gracefully ignore missing release date info

This commit is contained in:
Reinhard Pointner 2012-02-18 02:17:38 +00:00
parent f9c823581c
commit 3bf1a76773

View File

@ -85,7 +85,14 @@ public class TMDbClient implements MovieIdentificationService {
return null;
String name = getTextContent("name", movie);
int year = new Scanner(getTextContent("released", movie)).useDelimiter("\\D+").nextInt();
String released = getTextContent("released", movie);
int year = -1;
try {
year = new Scanner(released).useDelimiter("\\D+").nextInt();
} catch (Exception e) {
Logger.getLogger(getClass().getName()).log(Level.WARNING, "Illegal release year: " + released);
}
return new Movie(name, year, imdbid);
}