Update alist

This commit is contained in:
FongMi 2023-06-07 20:56:23 +08:00
parent 42e88dc937
commit 09c8793c68
5 changed files with 11 additions and 15 deletions

View File

@ -87,9 +87,11 @@ public class AList extends Spider {
fetchRule(); fetchRule();
String type = extend.containsKey("type") ? extend.get("type") : ""; String type = extend.containsKey("type") ? extend.get("type") : "";
String order = extend.containsKey("order") ? extend.get("order") : ""; String order = extend.containsKey("order") ? extend.get("order") : "";
String key = tid.contains("/") ? tid.substring(0, tid.indexOf("/")) : tid;
List<Item> folders = new ArrayList<>(); List<Item> folders = new ArrayList<>();
List<Item> files = new ArrayList<>(); List<Item> files = new ArrayList<>();
List<Vod> list = new ArrayList<>(); List<Vod> list = new ArrayList<>();
for (Item item : getList(tid, true)) { for (Item item : getList(tid, true)) {
if (item.isFolder()) folders.add(item); if (item.isFolder()) folders.add(item);
else files.add(item); else files.add(item);
@ -98,9 +100,12 @@ public class AList extends Spider {
Sorter.sort(type, order, folders); Sorter.sort(type, order, folders);
Sorter.sort(type, order, files); Sorter.sort(type, order, files);
} }
if (files.size() > 1) {
folders.add(0, Item.playList(files.get(0), vodPic)); int count = 0;
} Drive drive = getDrive(key);
for (Item item:files) if (item.isMedia(drive.isNew())) count++;
if (count > 1) folders.add(0, Item.playList(files.get(0), vodPic));
for (Item item : folders) list.add(item.getVod(tid, vodPic)); for (Item item : folders) list.add(item.getVod(tid, vodPic));
for (Item item : files) list.add(item.getVod(tid, vodPic)); for (Item item : files) list.add(item.getVod(tid, vodPic));
return Result.get().vod(list).page().string(); return Result.get().vod(list).page().string();

Binary file not shown.

View File

@ -1 +1 @@
7871d4d3a51b5b0aa46b079b8104c2be 17875e4db6cc760f260451ad7651e887

View File

@ -1,5 +1,5 @@
{ {
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;7871d4d3a51b5b0aa46b079b8104c2be", "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;17875e4db6cc760f260451ad7651e887",
"wallpaper": "https://gao.chuqiuyu.tk", "wallpaper": "https://gao.chuqiuyu.tk",
"sites": [ "sites": [
{ {

View File

@ -1,5 +1,5 @@
{ {
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;7871d4d3a51b5b0aa46b079b8104c2be", "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;17875e4db6cc760f260451ad7651e887",
"wallpaper": "http://饭太硬.top/深色壁纸/api.php", "wallpaper": "http://饭太硬.top/深色壁纸/api.php",
"sites": [ "sites": [
{ {
@ -234,15 +234,6 @@
"api": "csp_Push", "api": "csp_Push",
"searchable": 1, "searchable": 1,
"changeable": 0 "changeable": 0
},
{
"key": "公告",
"name": "公告",
"type": 3,
"api": "csp_Notice",
"searchable": 0,
"changeable": 0,
"ext": "ewogICJtc2ciOiAi6ICB5amGfue1kOWpmuS4gOmAseW5tOW/q+aogiIsCiAgImRhdGUiOiAiMjAyMzA2MDcyMDAwMDAiLAogICJkdXJhdGlvbiI6IDMwCn0="
} }
], ],
"doh": [ "doh": [