Update Alist
This commit is contained in:
parent
eb83fc407d
commit
09df2280b0
|
|
@ -93,6 +93,10 @@ public class Item {
|
||||||
return getType() == 1;
|
return getType() == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isVideo(boolean v3) {
|
||||||
|
return getType() == (v3 ? 2 : 3);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean ignore(boolean v3) {
|
public boolean ignore(boolean v3) {
|
||||||
if (v3) return getType() == 0 || getType() == 4;
|
if (v3) return getType() == 0 || getType() == 4;
|
||||||
return getType() == 0 || getType() == 2 || getType() == 5;
|
return getType() == 0 || getType() == 2 || getType() == 5;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.github.catvod.spider;
|
package com.github.catvod.spider;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.github.catvod.bean.Class;
|
import com.github.catvod.bean.Class;
|
||||||
import com.github.catvod.bean.Filter;
|
import com.github.catvod.bean.Filter;
|
||||||
|
|
@ -94,16 +95,20 @@ 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);
|
||||||
Item item = getDetail(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);
|
||||||
|
Drive drive = getDrive(key);
|
||||||
List<Item> parents = getList(path, false);
|
List<Item> parents = getList(path, false);
|
||||||
|
Sorter.sort("name", "asc", parents);
|
||||||
|
List<String> playUrls = new ArrayList<>();
|
||||||
|
for (Item item : parents) if (item.isVideo(drive.isNew())) playUrls.add(Trans.get(item.getName()) + "$" + item.getUrl() + findSubs(path, parents));
|
||||||
Vod vod = new Vod();
|
Vod vod = new Vod();
|
||||||
vod.setVodId(item.getVodId(id));
|
vod.setVodId(id);
|
||||||
vod.setVodName(item.getName());
|
vod.setVodName(name);
|
||||||
vod.setVodPic(item.getPic());
|
vod.setVodPlayFrom("AList");
|
||||||
vod.setVodTag(item.getVodTag());
|
vod.setVodPlayUrl(TextUtils.join("#", playUrls));
|
||||||
vod.setVodPlayFrom("播放");
|
vod.setVodPic("http://img1.3png.com/281e284a670865a71d91515866552b5f172b.png");
|
||||||
vod.setVodPlayUrl(Trans.get(item.getName()) + "$" + item.getUrl() + findSubs(path, parents));
|
|
||||||
return Result.string(vod);
|
return Result.string(vod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
3d99b9f6015e1779941725bbb179eb5f
|
d54084d0ba8d794dd2768ad3492fd208
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue