diff --git a/source/net/filebot/CacheManager.java b/source/net/filebot/CacheManager.java index 8937f769..7d7d4ce9 100644 --- a/source/net/filebot/CacheManager.java +++ b/source/net/filebot/CacheManager.java @@ -56,7 +56,7 @@ public class CacheManager { } private void clearDiskStore(File cache) { - getChildren(cache).stream().filter(f -> f.isFile() && !f.getName().startsWith(".")).forEach(f -> { + getChildren(cache, FILES).stream().filter(f -> !f.getName().startsWith(".")).forEach(f -> { try { delete(f); } catch (Exception e) { diff --git a/source/net/filebot/cli/ScriptShellMethods.java b/source/net/filebot/cli/ScriptShellMethods.java index e92424d7..4aa74e52 100644 --- a/source/net/filebot/cli/ScriptShellMethods.java +++ b/source/net/filebot/cli/ScriptShellMethods.java @@ -180,7 +180,7 @@ public class ScriptShellMethods { return FileVisitResult.SKIP_SUBTREE; } - if (FileUtilities.filter(FileUtilities.getChildren(folder), VIDEO_FILES).size() > 0 || MediaDetection.isDiskFolder(folder)) { + if (FileUtilities.getChildren(folder, VIDEO_FILES).size() > 0 || MediaDetection.isDiskFolder(folder)) { mediaFolders.add(folder); return FileVisitResult.SKIP_SUBTREE; } diff --git a/source/net/filebot/media/AutoDetection.java b/source/net/filebot/media/AutoDetection.java index 420da4ee..705a1f99 100644 --- a/source/net/filebot/media/AutoDetection.java +++ b/source/net/filebot/media/AutoDetection.java @@ -300,7 +300,7 @@ public class AutoDetection { } public boolean commonNumberPattern() { - return getChildren(f.getParentFile()).stream().filter(VIDEO_FILES::accept).filter(it -> { + return getChildren(f.getParentFile(), VIDEO_FILES, HUMAN_ORDER).stream().filter(it -> { return find(dn, snm) || find(normalize(it.getName()), snm); }).map(it -> { return streamMatches(it.getName(), EPISODE_NUMBERS).map(Integer::new).collect(toSet());