Fix alist
This commit is contained in:
parent
c132521e09
commit
fbce8f209a
|
|
@ -47,12 +47,16 @@ public class AList extends Spider {
|
||||||
drives = Drive.objectFrom(ext).getDrives();
|
drives = Drive.objectFrom(ext).getDrives();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drive getDrive(String name) {
|
private Drive checkVersion(Drive drive) {
|
||||||
Drive drive = drives.get(drives.indexOf(new Drive(name)));
|
|
||||||
if (drive.getVersion() == 0) drive.setVersion(OkHttpUtil.string(drive.settingsApi()).contains("v3.") ? 3 : 2);
|
if (drive.getVersion() == 0) drive.setVersion(OkHttpUtil.string(drive.settingsApi()).contains("v3.") ? 3 : 2);
|
||||||
return drive;
|
return drive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Drive getDrive(String name) {
|
||||||
|
Drive drive = drives.get(drives.indexOf(new Drive(name)));
|
||||||
|
return checkVersion(drive);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(Context context, String extend) {
|
public void init(Context context, String extend) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -121,7 +125,7 @@ public class AList extends Spider {
|
||||||
fetchRule();
|
fetchRule();
|
||||||
List<Vod> list = new ArrayList<>();
|
List<Vod> list = new ArrayList<>();
|
||||||
CountDownLatch cd = new CountDownLatch(drives.size());
|
CountDownLatch cd = new CountDownLatch(drives.size());
|
||||||
for (Drive drive : drives) new Thread(() -> search(cd, list, drive, keyword)).start();
|
for (Drive drive : drives) new Thread(() -> search(cd, list, checkVersion(drive), keyword)).start();
|
||||||
cd.await();
|
cd.await();
|
||||||
return Result.string(list);
|
return Result.string(list);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
aa1aaf2c71abcb2b2da5db8301c1e3da
|
4c2c569b1472f4e040ebc6a2de961864
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;aa1aaf2c71abcb2b2da5db8301c1e3da",
|
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;4c2c569b1472f4e040ebc6a2de961864",
|
||||||
"wallpaper": "https://gao.chuqiuyu.tk",
|
"wallpaper": "https://gao.chuqiuyu.tk",
|
||||||
"lives": [
|
"lives": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;aa1aaf2c71abcb2b2da5db8301c1e3da",
|
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;4c2c569b1472f4e040ebc6a2de961864",
|
||||||
"wallpaper": "http://www.kf666888.cn/api/tvbox/img",
|
"wallpaper": "http://www.kf666888.cn/api/tvbox/img",
|
||||||
"lives": [
|
"lives": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue