Add hidden config for alist
This commit is contained in:
parent
7bbd033708
commit
8fba01bde5
|
|
@ -37,6 +37,8 @@ public class Drive {
|
||||||
private String token;
|
private String token;
|
||||||
@SerializedName("search")
|
@SerializedName("search")
|
||||||
private Boolean search;
|
private Boolean search;
|
||||||
|
@SerializedName("hidden")
|
||||||
|
private Boolean hidden;
|
||||||
|
|
||||||
public static Drive objectFrom(String str) {
|
public static Drive objectFrom(String str) {
|
||||||
return new Gson().fromJson(str, Drive.class);
|
return new Gson().fromJson(str, Drive.class);
|
||||||
|
|
@ -98,6 +100,10 @@ public class Drive {
|
||||||
return search == null || search;
|
return search == null || search;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean hidden() {
|
||||||
|
return hidden != null && hidden;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isNew() {
|
public boolean isNew() {
|
||||||
return getVersion() == 3;
|
return getVersion() == 3;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ public class AList extends Spider {
|
||||||
fetchRule();
|
fetchRule();
|
||||||
List<Class> classes = new ArrayList<>();
|
List<Class> classes = new ArrayList<>();
|
||||||
LinkedHashMap<String, List<Filter>> filters = new LinkedHashMap<>();
|
LinkedHashMap<String, List<Filter>> filters = new LinkedHashMap<>();
|
||||||
for (Drive drive : drives) classes.add(drive.toType());
|
for (Drive drive : drives) if (!drive.hidden()) classes.add(drive.toType());
|
||||||
for (Class item : classes) filters.put(item.getTypeId(), getFilter());
|
for (Class item : classes) filters.put(item.getTypeId(), getFilter());
|
||||||
return Result.string(classes, filters);
|
return Result.string(classes, filters);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
60e553db98f40a31024cbac397528fde
|
e9ee25066054dee3891e754f566281b7
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue