Update ali api
This commit is contained in:
parent
1f3c391e37
commit
5adc8339d4
|
|
@ -277,7 +277,7 @@ public class API {
|
||||||
List<Item> files = new ArrayList<>();
|
List<Item> files = new ArrayList<>();
|
||||||
LinkedHashMap<String, List<String>> subMap = new LinkedHashMap<>();
|
LinkedHashMap<String, List<String>> subMap = new LinkedHashMap<>();
|
||||||
listFiles(new Item(getParentFileId(fileId, object)), files, subMap);
|
listFiles(new Item(getParentFileId(fileId, object)), files, subMap);
|
||||||
List<String> playFrom = Arrays.asList("原畫", "高清", "標清");
|
List<String> playFrom = Arrays.asList("原畫", "超清", "高清");
|
||||||
List<String> episode = new ArrayList<>();
|
List<String> episode = new ArrayList<>();
|
||||||
List<String> playUrl = new ArrayList<>();
|
List<String> playUrl = new ArrayList<>();
|
||||||
for (Item file : files) episode.add(Trans.get(file.getDisplayName()) + "$" + file.getFileId() + findSubs(file.getName(), subMap));
|
for (Item file : files) episode.add(Trans.get(file.getDisplayName()) + "$" + file.getFileId() + findSubs(file.getName(), subMap));
|
||||||
|
|
@ -365,7 +365,7 @@ public class API {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPreviewUrl(String fileId, String flag) {
|
public String getPreviewUrl(String fileId, String flag) {
|
||||||
return Proxy.getUrl() + "?do=ali&type=m3u8&file_id=" + fileId + "&flag=" + (flag.equals("高清") ? "FHD" : "HD");
|
return Proxy.getUrl() + "?do=ali&type=m3u8&file_id=" + fileId + "&flag=" + getPreviewQuality(flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDownloadUrl(String fileId) {
|
public String getDownloadUrl(String fileId) {
|
||||||
|
|
@ -476,6 +476,19 @@ public class API {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getPreviewQuality(String flag) {
|
||||||
|
switch (flag) {
|
||||||
|
case "2K":
|
||||||
|
return "QHD";
|
||||||
|
case "超清":
|
||||||
|
return "FHD";
|
||||||
|
case "高清":
|
||||||
|
return "HD";
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private String getPreviewQuality(JSONArray taskList, String flag) throws Exception {
|
private String getPreviewQuality(JSONArray taskList, String flag) throws Exception {
|
||||||
for (int i = 0; i < taskList.length(); ++i) {
|
for (int i = 0; i < taskList.length(); ++i) {
|
||||||
JSONObject task = taskList.getJSONObject(i);
|
JSONObject task = taskList.getJSONObject(i);
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
89f3b48308be53927963f843817027d6
|
cd0e21fc175ab24e9f754ec27ee15f27
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue