1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-04 08:25:03 -05:00

* make sure we don't crash just because the clutter file filter isn't available (e.g if website is down)

This commit is contained in:
Reinhard Pointner 2015-07-25 22:46:06 +00:00
parent a30717fa34
commit abeb60dfb1

View File

@ -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;
}