mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Add start
and end
to clip resolved response
This commit is contained in:
parent
d67e50b5b8
commit
a8855e1cc1
2 changed files with 8 additions and 2 deletions
|
@ -323,8 +323,10 @@ public class StreamHandlers {
|
||||||
body, getPreferredLocalization());
|
body, getPreferredLocalization());
|
||||||
|
|
||||||
final String videoId = JsonUtils.getString(jsonResponse, "endpoint.watchEndpoint.videoId");
|
final String videoId = JsonUtils.getString(jsonResponse, "endpoint.watchEndpoint.videoId");
|
||||||
|
final String start = JsonUtils.getString(jsonResponse, "endpoint.watchEndpoint.start");
|
||||||
|
final String end = JsonUtils.getString(jsonResponse, "endpoint.watchEndpoint.end");
|
||||||
|
|
||||||
return mapper.writeValueAsBytes(new VideoResolvedResponse(videoId));
|
return mapper.writeValueAsBytes(new VideoResolvedResponse(videoId, start, end));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte[] commentsResponse(String videoId) throws Exception {
|
public static byte[] commentsResponse(String videoId) throws Exception {
|
||||||
|
|
|
@ -3,8 +3,12 @@ package me.kavin.piped.utils.resp;
|
||||||
public class VideoResolvedResponse {
|
public class VideoResolvedResponse {
|
||||||
|
|
||||||
public String videoId;
|
public String videoId;
|
||||||
|
public String start;
|
||||||
|
public String end;
|
||||||
|
|
||||||
public VideoResolvedResponse(String videoId) {
|
public VideoResolvedResponse(String videoId, String start, String end) {
|
||||||
this.videoId = videoId;
|
this.videoId = videoId;
|
||||||
|
this.start = start;
|
||||||
|
this.end = end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue