Remove play list for ali
This commit is contained in:
parent
5d81bb5377
commit
47872fdaf0
|
|
@ -35,14 +35,6 @@ public class Item {
|
||||||
return new Gson().fromJson(str, Item.class);
|
return new Gson().fromJson(str, Item.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Item playList(Item copy, String vodPic) {
|
|
||||||
Item item = new Item();
|
|
||||||
item.name = "播放列表";
|
|
||||||
item.path = copy.path;
|
|
||||||
item.thumb = vodPic;
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<Item> arrayFrom(String str) {
|
public static List<Item> arrayFrom(String str) {
|
||||||
Type listType = new TypeToken<List<Item>>() {}.getType();
|
Type listType = new TypeToken<List<Item>>() {}.getType();
|
||||||
return new Gson().fromJson(str, listType);
|
return new Gson().fromJson(str, listType);
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,6 @@ 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<>();
|
||||||
|
|
@ -101,11 +100,6 @@ public class AList extends Spider {
|
||||||
Sorter.sort(type, order, files);
|
Sorter.sort(type, order, files);
|
||||||
}
|
}
|
||||||
|
|
||||||
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();
|
||||||
|
|
@ -115,7 +109,6 @@ public class AList extends Spider {
|
||||||
public String detailContent(List<String> ids) throws Exception {
|
public String detailContent(List<String> ids) throws Exception {
|
||||||
fetchRule();
|
fetchRule();
|
||||||
String id = ids.get(0);
|
String id = ids.get(0);
|
||||||
boolean list = id.endsWith("播放列表");
|
|
||||||
String key = id.contains("/") ? id.substring(0, id.indexOf("/")) : id;
|
String key = id.contains("/") ? id.substring(0, id.indexOf("/")) : id;
|
||||||
String path = id.substring(0, id.lastIndexOf("/"));
|
String path = id.substring(0, id.lastIndexOf("/"));
|
||||||
String name = path.substring(path.lastIndexOf("/") + 1);
|
String name = path.substring(path.lastIndexOf("/") + 1);
|
||||||
|
|
@ -124,22 +117,12 @@ public class AList extends Spider {
|
||||||
Sorter.sort("name", "asc", parents);
|
Sorter.sort("name", "asc", parents);
|
||||||
Vod vod = new Vod();
|
Vod vod = new Vod();
|
||||||
vod.setVodPlayFrom(key);
|
vod.setVodPlayFrom(key);
|
||||||
|
vod.setVodId(id);
|
||||||
if (list) {
|
vod.setVodName(name);
|
||||||
vod.setVodId(id);
|
vod.setVodPic(vodPic);
|
||||||
vod.setVodName(name);
|
List<String> playUrls = new ArrayList<>();
|
||||||
vod.setVodPic(vodPic);
|
for (Item item : parents) if (item.isMedia(drive.isNew())) playUrls.add(item.getName() + "$" + item.getVodId(path) + findSubs(path, parents));
|
||||||
List<String> playUrls = new ArrayList<>();
|
vod.setVodPlayUrl(TextUtils.join("#", playUrls));
|
||||||
for (Item item : parents) if (item.isMedia(drive.isNew())) playUrls.add(item.getName() + "$" + item.getVodId(path) + findSubs(path, parents));
|
|
||||||
vod.setVodPlayUrl(TextUtils.join("#", playUrls));
|
|
||||||
} else {
|
|
||||||
Item item = getDetail(id);
|
|
||||||
vod.setVodId(item.getVodId(id));
|
|
||||||
vod.setVodName(item.getName());
|
|
||||||
vod.setVodPic(item.getPic(vodPic));
|
|
||||||
vod.setVodPlayUrl(item.getName() + "$" + item.getVodId(path) + findSubs(path, parents));
|
|
||||||
}
|
|
||||||
|
|
||||||
return Result.string(vod);
|
return Result.string(vod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
ae1463f4584754ef50ab902920ccb7da
|
942e99b122cf9eb8d0859bbab9994f12
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue