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

fix unecessary double caching

This commit is contained in:
Reinhard Pointner 2016-02-04 10:05:29 +00:00
parent e4ed235c55
commit 4ba06f256a

View File

@ -73,27 +73,18 @@ public class MediaDetection {
public static final ReleaseInfo releaseInfo = new ReleaseInfo();
private static FileFilter diskFolder;
private static FileFilter clutterFile;
public static FileFilter getDiskFolderFilter() {
if (diskFolder == null) {
diskFolder = releaseInfo.getDiskFolderFilter();
}
return diskFolder;
return releaseInfo.getDiskFolderFilter();
}
public static FileFilter getClutterFileFilter() {
if (clutterFile == null) {
try {
clutterFile = releaseInfo.getClutterFileFilter();
return releaseInfo.getClutterFileFilter();
} catch (IOException e) {
Logger.getLogger(MediaDetection.class.getClass().getName()).log(Level.SEVERE, "Unable to access clutter file filter: " + e.getMessage(), e);
}
return ((File f) -> false);
}
}
return clutterFile;
}
public static boolean isDiskFolder(File folder) {
return getDiskFolderFilter().accept(folder);