From abeb60dfb12a3bafe023c96622ee672cdae69efe Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 25 Jul 2015 22:46:06 +0000 Subject: [PATCH] * make sure we don't crash just because the clutter file filter isn't available (e.g if website is down) --- source/net/filebot/media/MediaDetection.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/net/filebot/media/MediaDetection.java b/source/net/filebot/media/MediaDetection.java index 41a842e5..55dc4d8d 100644 --- a/source/net/filebot/media/MediaDetection.java +++ b/source/net/filebot/media/MediaDetection.java @@ -83,9 +83,14 @@ public class MediaDetection { return diskFolder; } - public static FileFilter getClutterFileFilter() throws IOException { + public static FileFilter getClutterFileFilter() { if (clutterFile == null) { - clutterFile = releaseInfo.getClutterFileFilter(); + try { + clutterFile = releaseInfo.getClutterFileFilter(); + } catch (IOException e) { + Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.WARNING, "Unable to access clutter file filter: " + e.getMessage(), e); + return ((File f) -> false); + } } return clutterFile; }