Support usb path
This commit is contained in:
parent
86635cb0e1
commit
2f1c48fa5a
|
|
@ -33,8 +33,14 @@ public class Local extends Spider {
|
|||
@Override
|
||||
public String homeContent(boolean filter) throws Exception {
|
||||
List<Class> classes = new ArrayList<>();
|
||||
String root = Environment.getExternalStorageDirectory().getAbsolutePath();
|
||||
classes.add(new Class(root, "本地文件", "1"));
|
||||
classes.add(new Class(Environment.getExternalStorageDirectory().getAbsolutePath(), "本地文件", "1"));
|
||||
File[] files = new File("/storage").listFiles();
|
||||
if (files == null) return Result.string(classes, new ArrayList<>());
|
||||
List<String> exclude = Arrays.asList("emulated", "sdcard", "self");
|
||||
for (File file : files) {
|
||||
if (exclude.contains(file.getName())) continue;
|
||||
classes.add(new Class(file.getAbsolutePath(), file.getName(), "1"));
|
||||
}
|
||||
return Result.string(classes, new ArrayList<>());
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
ca59a045079b3b0d57696149fa73864f
|
||||
e276d142b10b9f2c2971664d0b9dc9a3
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;ca59a045079b3b0d57696149fa73864f",
|
||||
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;e276d142b10b9f2c2971664d0b9dc9a3",
|
||||
"wallpaper": "https://gao.chuqiuyu.tk",
|
||||
"sites": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;ca59a045079b3b0d57696149fa73864f",
|
||||
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;e276d142b10b9f2c2971664d0b9dc9a3",
|
||||
"wallpaper": "http://饭太硬.ga/深色壁纸/api.php",
|
||||
"sites": [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue