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:
parent
f9c823581c
commit
3bf1a76773
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user