Add format sample
This commit is contained in:
parent
28937c6957
commit
cec0140c96
|
|
@ -392,7 +392,7 @@ public class API {
|
|||
}
|
||||
|
||||
public String playerContent(String[] ids) {
|
||||
return Result.get().url(getDownloadUrl(ids[0])).subs(getSubs(ids)).header(getHeader()).string();
|
||||
return Result.get().url(getDownloadUrl(ids[0])).octet().subs(getSubs(ids)).header(getHeader()).string();
|
||||
}
|
||||
|
||||
public String playerContent(String[] ids, String flag) {
|
||||
|
|
@ -401,7 +401,7 @@ public class API {
|
|||
String url = getPreviewUrl(playInfo, flag);
|
||||
List<Sub> subs = getSubs(ids);
|
||||
subs.addAll(getSubs(playInfo));
|
||||
return Result.get().url(url).subs(subs).header(getHeader()).string();
|
||||
return Result.get().url(url).m3u8().subs(subs).header(getHeader()).string();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Result.get().url("").string();
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ public class Result {
|
|||
private LinkedHashMap<String, List<Filter>> filters;
|
||||
@SerializedName("header")
|
||||
private String header;
|
||||
@SerializedName("format")
|
||||
private String format;
|
||||
@SerializedName("url")
|
||||
private String url;
|
||||
@SerializedName("subs")
|
||||
|
|
@ -129,11 +131,36 @@ public class Result {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Result format(String format) {
|
||||
this.format = format;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result subs(List<Sub> subs) {
|
||||
this.subs = subs;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result dash() {
|
||||
this.format = "application/dash+xml";
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result m3u8() {
|
||||
this.format = "application/x-mpegURL";
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result rtsp() {
|
||||
this.format = "application/x-rtsp";
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result octet() {
|
||||
this.format = "application/octet-stream";
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result page() {
|
||||
return page(1, 1, 0, 1);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
5293550a292d61fd7318571385c4fc11
|
||||
f7dbc2384bc488cf422fb91bbb2e56ec
|
||||
|
|
|
|||
Loading…
Reference in New Issue