From 3bf1a76773b095d1f412c80e0c569b34b882b4b9 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 18 Feb 2012 02:17:38 +0000 Subject: [PATCH] * gracefully ignore missing release date info --- source/net/sourceforge/filebot/web/TMDbClient.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/net/sourceforge/filebot/web/TMDbClient.java b/source/net/sourceforge/filebot/web/TMDbClient.java index 9b055d4a..061d371f 100644 --- a/source/net/sourceforge/filebot/web/TMDbClient.java +++ b/source/net/sourceforge/filebot/web/TMDbClient.java @@ -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); }