Fix alist

This commit is contained in:
FongMi 2023-06-09 08:56:23 +08:00
parent 8f64c9f6c0
commit 27c83e3cdd
3 changed files with 13 additions and 10 deletions

View File

@ -103,7 +103,7 @@ public class AList extends Spider {
int count = 0; int count = 0;
Drive drive = getDrive(key); Drive drive = getDrive(key);
for (Item item:files) if (item.isMedia(drive.isNew())) count++; for (Item item : files) if (item.isMedia(drive.isNew())) count++;
if (count > 1) folders.add(0, Item.playList(files.get(0), vodPic)); 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));
@ -120,23 +120,26 @@ public class AList extends Spider {
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);
Drive drive = getDrive(key); Drive drive = getDrive(key);
List<String> playUrls = new ArrayList<>();
List<Item> parents = getList(path, false); List<Item> parents = getList(path, false);
Sorter.sort("name", "asc", parents); Sorter.sort("name", "asc", parents);
Vod vod = new Vod();
vod.setVodPlayFrom(key);
if (list) { if (list) {
vod.setVodId(id);
vod.setVodName(name);
vod.setVodPic(vodPic);
List<String> playUrls = new ArrayList<>();
for (Item item : parents) if (item.isMedia(drive.isNew())) playUrls.add(item.getName() + "$" + item.getVodId(path) + findSubs(path, parents)); 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 { } else {
Item item = getDetail(id); Item item = getDetail(id);
playUrls.add(item.getName() + "$" + item.getVodId(path) + findSubs(path, parents)); vod.setVodId(item.getVodId(id));
vod.setVodName(item.getName());
vod.setVodPic(item.getPic(vodPic));
vod.setVodPlayUrl(item.getName() + "$" + item.getVodId(path) + findSubs(path, parents));
} }
Vod vod = new Vod();
vod.setVodId(id);
vod.setVodName(name);
vod.setVodPic(vodPic);
vod.setVodPlayFrom(key);
vod.setVodPlayUrl(TextUtils.join("#", playUrls));
return Result.string(vod); return Result.string(vod);
} }

Binary file not shown.

View File

@ -1 +1 @@
17875e4db6cc760f260451ad7651e887 91c9b5707a41ef60147a684a61089966