From f1424755cab6ca1dca0aa2d1b4252edeb33385b4 Mon Sep 17 00:00:00 2001 From: polymorphicshade Date: Thu, 17 Sep 2020 10:07:49 -0600 Subject: [PATCH] SponsorBlock: Reduced the amount of video ID hash characters sent to the SponsorBlock API This should hopefully improve privacy. --- app/src/main/java/org/schabi/newpipe/SponsorBlockApiTask.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/SponsorBlockApiTask.java b/app/src/main/java/org/schabi/newpipe/SponsorBlockApiTask.java index 3f8464126..6c3792660 100644 --- a/app/src/main/java/org/schabi/newpipe/SponsorBlockApiTask.java +++ b/app/src/main/java/org/schabi/newpipe/SponsorBlockApiTask.java @@ -73,7 +73,7 @@ public class SponsorBlockApiTask extends AsyncTask { return null; } - final String params = "skipSegments/" + videoIdHash.substring(0, 8) + final String params = "skipSegments/" + videoIdHash.substring(0, 4) + "?categories=" + categoryParams; final JsonArray responseArray = execute(params).get(); @@ -83,7 +83,7 @@ public class SponsorBlockApiTask extends AsyncTask { for (final Object obj1 : responseArray) { final JsonObject jObj1 = (JsonObject) obj1; - final String responseVideoId = (String) jObj1.getString("videoID"); + final String responseVideoId = jObj1.getString("videoID"); if (!responseVideoId.equals(videoId)) { continue; }