fix(YouTube - Client spoof): Display seekbar thumbnails in high quality

This commit is contained in:
oSumAtrIX 2023-09-25 23:50:41 +02:00
parent b76794b08c
commit f71c1a0c15
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
3 changed files with 22 additions and 6 deletions

View File

@ -40,6 +40,7 @@ public class SpoofSignaturePatch {
private static boolean isPlayingShorts; private static boolean isPlayingShorts;
private static String storyboardRendererSpec = ""; private static String storyboardRendererSpec = "";
private static int recommendedLevel;
/** /**
* Injection point. * Injection point.
@ -82,17 +83,30 @@ public class SpoofSignaturePatch {
return SettingsEnum.SPOOF_SIGNATURE.getBoolean(); return SettingsEnum.SPOOF_SIGNATURE.getBoolean();
} }
/** /**
* Injection point. * Injection point.
*/ */
public static String getStoryboardRendererSpec() { public static String getStoryboardRendererSpec(String originalStoryboardRendererSpec) {
if (!SettingsEnum.SPOOF_SIGNATURE.getBoolean()) return originalStoryboardRendererSpec;
return storyboardRendererSpec; return storyboardRendererSpec;
} }
public static void setStoryboardRendererSpec(String newlyLoadedStoryboardRendererSpec) { /**
if (storyboardRendererSpec.equals(newlyLoadedStoryboardRendererSpec)) * Injection point.
return; */
public static int getRecommendedLevel(int originalLevel) {
if (!SettingsEnum.SPOOF_SIGNATURE.getBoolean()) return originalLevel;
return recommendedLevel;
}
public static void setStoryboardRendererSpec(String newlyLoadedStoryboardRendererSpec) {
storyboardRendererSpec = newlyLoadedStoryboardRendererSpec; storyboardRendererSpec = newlyLoadedStoryboardRendererSpec;
} }
public static void setRecommendedLevel(int level) {
recommendedLevel = level;
}
} }

View File

@ -53,6 +53,8 @@ public class StoryBoardRendererRequester {
final String storyboardsRendererSpec = storyboardsRenderer.getString("spec"); final String storyboardsRendererSpec = storyboardsRenderer.getString("spec");
SpoofSignaturePatch.setStoryboardRendererSpec(storyboardsRendererSpec); SpoofSignaturePatch.setStoryboardRendererSpec(storyboardsRendererSpec);
SpoofSignaturePatch.setRecommendedLevel(storyboardsRenderer.getInt("recommendedLevel"));
LogHelper.printDebug(() -> "StoryBoard renderer spec: " + storyboardsRendererSpec); LogHelper.printDebug(() -> "StoryBoard renderer spec: " + storyboardsRendererSpec);
} else { } else {

View File

@ -12,8 +12,8 @@ public final class StoryBoardRendererRoutes {
static final Route GET_STORYBOARD_SPEC = new Route( static final Route GET_STORYBOARD_SPEC = new Route(
Route.Method.POST, Route.Method.POST,
"player" + "player" +
"?fields=storyboards.playerStoryboardSpecRenderer.spec," + "?fields=storyboards.playerStoryboardSpecRenderer," +
"storyboards.playerLiveStoryboardSpecRenderer.spec" "storyboards.playerLiveStoryboardSpecRenderer"
); );
private StoryBoardRendererRoutes() { private StoryBoardRendererRoutes() {