mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-12-01 00:02:55 +01:00
submit video duration with segments
This commit is contained in:
parent
3773422f4c
commit
fde1f3d95b
@ -23,6 +23,7 @@ import java.util.Locale;
|
||||
|
||||
import fi.vanced.utils.requests.Requester;
|
||||
import fi.vanced.utils.requests.Route;
|
||||
import pl.jakubweg.PlayerController;
|
||||
import pl.jakubweg.SponsorBlockSettings;
|
||||
import pl.jakubweg.SponsorBlockUtils;
|
||||
import pl.jakubweg.SponsorBlockUtils.VoteOption;
|
||||
@ -80,7 +81,8 @@ public class SBRequester {
|
||||
try {
|
||||
String start = String.format(Locale.US, TIME_TEMPLATE, startTime);
|
||||
String end = String.format(Locale.US, TIME_TEMPLATE, endTime);
|
||||
HttpURLConnection connection = getConnectionFromRoute(SBRoutes.SUBMIT_SEGMENTS, videoId, uuid, start, end, category);
|
||||
String duration = String.valueOf(PlayerController.getCurrentVideoLength() / 1000);
|
||||
HttpURLConnection connection = getConnectionFromRoute(SBRoutes.SUBMIT_SEGMENTS, videoId, uuid, start, end, category, duration);
|
||||
int responseCode = connection.getResponseCode();
|
||||
|
||||
switch (responseCode) {
|
||||
|
@ -10,7 +10,7 @@ public class SBRoutes {
|
||||
public static final Route VIEWED_SEGMENT = new Route(POST, "viewedVideoSponsorTime?UUID={segment_id}");
|
||||
public static final Route GET_USER_STATS = new Route(GET, "userInfo?userID={user_id}&values=[\"userName\", \"minutesSaved\", \"segmentCount\", \"viewCount\"]");
|
||||
public static final Route CHANGE_USERNAME = new Route(POST, "setUsername?userID={user_id}&username={username}");
|
||||
public static final Route SUBMIT_SEGMENTS = new Route(POST, "skipSegments?videoID={video_id}&userID={user_id}&startTime={start_time}&endTime={end_time}&category={category}");
|
||||
public static final Route SUBMIT_SEGMENTS = new Route(POST, "skipSegments?videoID={video_id}&userID={user_id}&startTime={start_time}&endTime={end_time}&category={category}&videoDuration={duration}");
|
||||
public static final Route VOTE_ON_SEGMENT_QUALITY = new Route(POST, "voteOnSponsorTime?UUID={segment_id}&userID={user_id}&type={type}");
|
||||
public static final Route VOTE_ON_SEGMENT_CATEGORY = new Route(POST, "voteOnSponsorTime?UUID={segment_id}&userID={user_id}&category={category}");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user