This commit is contained in:
FongMi 2024-06-25 22:04:14 +08:00
parent acf0d29040
commit 7f06546931
3 changed files with 4 additions and 3 deletions

View File

@ -106,9 +106,10 @@ public class Local extends Spider {
private List<Sub> getSubs(String path) {
File file = new File(path);
if (file.getParentFile() == null) return Collections.emptyList();
File[] files = file.getParentFile() == null ? null : file.getParentFile().listFiles();
if (files == null || files.length == 0) return Collections.emptyList();
List<Sub> subs = new ArrayList<>();
for (File f : file.getParentFile().listFiles()) {
for (File f : files) {
String ext = Util.getExt(f.getName());
if (Util.isSub(ext)) subs.add(Sub.create().name(Util.removeExt(f.getName())).ext(ext).url("file://" + f.getAbsolutePath()));
}

Binary file not shown.

View File

@ -1 +1 @@
fd1b4ae6ab532b829b3256e786c03e21
b65fbd46a646519fea2b594f2faf4138