diff --git a/source/net/sourceforge/filebot/cli/CmdlineOperations.java b/source/net/sourceforge/filebot/cli/CmdlineOperations.java index b8f034f7..4b658ce4 100644 --- a/source/net/sourceforge/filebot/cli/CmdlineOperations.java +++ b/source/net/sourceforge/filebot/cli/CmdlineOperations.java @@ -37,7 +37,6 @@ import java.util.SortedSet; import java.util.TreeMap; import java.util.TreeSet; import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; @@ -285,18 +284,15 @@ public class CmdlineOperations implements CmdlineInterface { Set episodes = new LinkedHashSet(); for (Future> future : executor.invokeAll(tasks)) { - try { - episodes.addAll(future.get()); - } catch (ExecutionException e) { - CLILogger.finest(e.getCause().getMessage()); - } + // if anything goes wrong make sure to unwind as a partial episode set possibly missing important data can lead to bad matches + episodes.addAll(future.get()); } // all background workers have finished return episodes; } finally { // destroy background threads - executor.shutdown(); + executor.shutdownNow(); } }