From e8d11717ba25213c9f802f7b3bc1c5e0c0bc631f Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 3 May 2016 19:28:52 +0800 Subject: [PATCH] Better logging --- source/net/filebot/web/OpenSubtitlesClient.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/net/filebot/web/OpenSubtitlesClient.java b/source/net/filebot/web/OpenSubtitlesClient.java index 54072f31..962e898e 100644 --- a/source/net/filebot/web/OpenSubtitlesClient.java +++ b/source/net/filebot/web/OpenSubtitlesClient.java @@ -226,9 +226,11 @@ public class OpenSubtitlesClient implements SubtitleProvider, VideoHashSubtitleS // debug dummy files, e.g. {hash: 1ed67c43e4a3b09f, size: 992272721} try { Map json = asMap(readJson(readTextFile(f))); - return Query.forHash(json.get("hash").toString(), Long.parseLong(json.get("size").toString()), getLanguageFilter(language)); + if (json != null) { + return Query.forHash(json.get("hash").toString(), Long.parseLong(json.get("size").toString()), getLanguageFilter(language)); + } } catch (Exception e) { - debug.finest(e::toString); + debug.finest("Ignore sample file: " + f); } } return null;