mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-15 13:55:03 -05:00
* helper method that could be useful in scripts and otherwise
This commit is contained in:
parent
76073cfb9d
commit
7385a8d307
@ -1371,6 +1371,21 @@ public class MediaDetection {
|
||||
}
|
||||
};
|
||||
|
||||
public static List<File> getMediaUnits(File folder) {
|
||||
if (folder.isHidden()) {
|
||||
return emptyList();
|
||||
}
|
||||
|
||||
if (folder.isDirectory() && !isDiskFolder(folder)) {
|
||||
List<File> children = new ArrayList<File>();
|
||||
for (File f : getChildren(folder)) {
|
||||
children.addAll(getMediaUnits(f));
|
||||
}
|
||||
}
|
||||
|
||||
return singletonList(folder);
|
||||
}
|
||||
|
||||
public static Object readMetaInfo(File file) {
|
||||
if (useExtendedFileAttributes()) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user