From 266d0c7edc8aae1120e57cfa3e791535907b1db2 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 30 Jul 2015 16:38:24 +0000 Subject: [PATCH] * make "Missing data: release date" warning message more clear --- source/net/filebot/web/TMDbClient.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/net/filebot/web/TMDbClient.java b/source/net/filebot/web/TMDbClient.java index 88a1de9d..60759914 100644 --- a/source/net/filebot/web/TMDbClient.java +++ b/source/net/filebot/web/TMDbClient.java @@ -99,6 +99,7 @@ public class TMDbClient implements MovieIdentificationService { // e.g. // {"id":16320,"title":"冲出宁静号","release_date":"2005-09-30","original_title":"Serenity"} + int id = -1, year = -1; String title = (String) it.get("title"); String originalTitle = (String) it.get("original_title"); if (title == null || title.isEmpty()) { @@ -106,8 +107,7 @@ public class TMDbClient implements MovieIdentificationService { } try { - int id = Float.valueOf(it.get("id").toString()).intValue(); - int year = -1; + id = Float.valueOf(it.get("id").toString()).intValue(); try { String release = (String) it.get("release_date"); year = new Scanner(release).useDelimiter("\\D+").nextInt(); @@ -143,7 +143,7 @@ public class TMDbClient implements MovieIdentificationService { } catch (Exception e) { // only print 'missing release date' warnings for matching movie titles if (movieName.equalsIgnoreCase(title) || movieName.equalsIgnoreCase(originalTitle)) { - Logger.getLogger(TMDbClient.class.getName()).log(Level.WARNING, String.format("Ignore movie [%s]: %s", title, e.getMessage())); + Logger.getLogger(TMDbClient.class.getName()).log(Level.WARNING, String.format("Ignore movie metadata: %s [%d]: %s", title, id, e.getMessage())); } } }