From 07e0b20dc106dfa4713e3dbd31a6b2f1cd905cac Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 13 Apr 2012 01:56:22 +0000 Subject: [PATCH] * ignore missing episode lists and continue --- .../filebot/cli/CmdlineOperations.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/source/net/sourceforge/filebot/cli/CmdlineOperations.java b/source/net/sourceforge/filebot/cli/CmdlineOperations.java index 17f9dc6a..744e144a 100644 --- a/source/net/sourceforge/filebot/cli/CmdlineOperations.java +++ b/source/net/sourceforge/filebot/cli/CmdlineOperations.java @@ -37,6 +37,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; +import java.util.logging.Level; import java.util.regex.Pattern; import net.sourceforge.filebot.Analytics; @@ -252,11 +253,14 @@ public class CmdlineOperations implements CmdlineInterface { if (selectedSearchResults != null) { List episodes = new ArrayList(); for (SearchResult it : selectedSearchResults) { - CLILogger.fine(format("Fetching episode data for [%s]", it.getName())); - episodes.addAll(db.getEpisodeList(it, sortOrder, locale)); - Analytics.trackEvent(db.getName(), "FetchEpisodeList", it.getName()); + try { + CLILogger.fine(format("Fetching episode data for [%s]", it.getName())); + episodes.addAll(db.getEpisodeList(it, sortOrder, locale)); + Analytics.trackEvent(db.getName(), "FetchEpisodeList", it.getName()); + } catch (IOException e) { + CLILogger.log(Level.SEVERE, e.getMessage(), e); + } } - return episodes; } } @@ -592,8 +596,9 @@ public class CmdlineOperations implements CmdlineInterface { for (File it : remainingVideos) { CLILogger.warning("No matching subtitles found: " + it); } - - Analytics.trackEvent("CLI", "Download", "Subtitle", subtitleFiles.size()); + if (subtitleFiles.size() > 0) { + Analytics.trackEvent("CLI", "Download", "Subtitle", subtitleFiles.size()); + } return subtitleFiles; }