|
|
|
|
@ -98,6 +98,9 @@ public class AList extends Spider { |
|
|
|
|
Sorter.sort(type, order, folders); |
|
|
|
|
Sorter.sort(type, order, files); |
|
|
|
|
} |
|
|
|
|
if (files.size() > 1) { |
|
|
|
|
folders.add(0, Item.playList(files.get(0), vodPic)); |
|
|
|
|
} |
|
|
|
|
for (Item item : folders) list.add(item.getVod(tid, vodPic)); |
|
|
|
|
for (Item item : files) list.add(item.getVod(tid, vodPic)); |
|
|
|
|
return Result.get().vod(list).page().string(); |
|
|
|
|
@ -107,18 +110,22 @@ public class AList extends Spider { |
|
|
|
|
public String detailContent(List<String> ids) throws Exception { |
|
|
|
|
fetchRule(); |
|
|
|
|
String id = ids.get(0); |
|
|
|
|
boolean list = id.endsWith("播放列表"); |
|
|
|
|
String key = id.contains("/") ? id.substring(0, id.indexOf("/")) : id; |
|
|
|
|
String path = id.substring(0, id.lastIndexOf("/")); |
|
|
|
|
String name = path.substring(path.lastIndexOf("/") + 1); |
|
|
|
|
Drive drive = getDrive(key); |
|
|
|
|
List<String> playUrls = new ArrayList<>(); |
|
|
|
|
List<Item> parents = getList(path, false); |
|
|
|
|
Sorter.sort("name", "asc", parents); |
|
|
|
|
List<String> playUrls = new ArrayList<>(); |
|
|
|
|
for (Item item : parents) { |
|
|
|
|
if (item.isMedia(drive.isNew())) { |
|
|
|
|
playUrls.add(item.getName() + "$" + item.getVodId(path) + findSubs(path, parents)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (list) { |
|
|
|
|
for (Item item : parents) if (item.isMedia(drive.isNew())) playUrls.add(item.getName() + "$" + item.getVodId(path) + findSubs(path, parents)); |
|
|
|
|
} else { |
|
|
|
|
Item item = getDetail(id); |
|
|
|
|
playUrls.add(item.getName() + "$" + item.getVodId(path) + findSubs(path, parents)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Vod vod = new Vod(); |
|
|
|
|
vod.setVodId(id); |
|
|
|
|
vod.setVodName(name); |
|
|
|
|
|