Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add start and end to clip resolved response #808

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,10 @@ public static byte[] resolveClipId(String clipId) throws Exception {
body, getPreferredLocalization());

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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
public class VideoResolvedResponse {

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.start = start;
this.end = end;
}
}