mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-12-01 00:02:55 +01:00
fix(YouTube - Client spoof): Display seekbar thumbnails in high quality
This commit is contained in:
parent
b76794b08c
commit
f71c1a0c15
@ -40,6 +40,7 @@ public class SpoofSignaturePatch {
|
||||
private static boolean isPlayingShorts;
|
||||
|
||||
private static String storyboardRendererSpec = "";
|
||||
private static int recommendedLevel;
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
@ -82,17 +83,30 @@ public class SpoofSignaturePatch {
|
||||
return SettingsEnum.SPOOF_SIGNATURE.getBoolean();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static String getStoryboardRendererSpec() {
|
||||
public static String getStoryboardRendererSpec(String originalStoryboardRendererSpec) {
|
||||
if (!SettingsEnum.SPOOF_SIGNATURE.getBoolean()) return originalStoryboardRendererSpec;
|
||||
|
||||
return storyboardRendererSpec;
|
||||
}
|
||||
|
||||
public static void setStoryboardRendererSpec(String newlyLoadedStoryboardRendererSpec) {
|
||||
if (storyboardRendererSpec.equals(newlyLoadedStoryboardRendererSpec))
|
||||
return;
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static int getRecommendedLevel(int originalLevel) {
|
||||
if (!SettingsEnum.SPOOF_SIGNATURE.getBoolean()) return originalLevel;
|
||||
|
||||
return recommendedLevel;
|
||||
}
|
||||
|
||||
public static void setStoryboardRendererSpec(String newlyLoadedStoryboardRendererSpec) {
|
||||
storyboardRendererSpec = newlyLoadedStoryboardRendererSpec;
|
||||
}
|
||||
|
||||
public static void setRecommendedLevel(int level) {
|
||||
recommendedLevel = level;
|
||||
}
|
||||
}
|
||||
|
@ -53,6 +53,8 @@ public class StoryBoardRendererRequester {
|
||||
final String storyboardsRendererSpec = storyboardsRenderer.getString("spec");
|
||||
|
||||
SpoofSignaturePatch.setStoryboardRendererSpec(storyboardsRendererSpec);
|
||||
SpoofSignaturePatch.setRecommendedLevel(storyboardsRenderer.getInt("recommendedLevel"));
|
||||
|
||||
LogHelper.printDebug(() -> "StoryBoard renderer spec: " + storyboardsRendererSpec);
|
||||
|
||||
} else {
|
||||
|
@ -12,8 +12,8 @@ public final class StoryBoardRendererRoutes {
|
||||
static final Route GET_STORYBOARD_SPEC = new Route(
|
||||
Route.Method.POST,
|
||||
"player" +
|
||||
"?fields=storyboards.playerStoryboardSpecRenderer.spec," +
|
||||
"storyboards.playerLiveStoryboardSpecRenderer.spec"
|
||||
"?fields=storyboards.playerStoryboardSpecRenderer," +
|
||||
"storyboards.playerLiveStoryboardSpecRenderer"
|
||||
);
|
||||
|
||||
private StoryBoardRendererRoutes() {
|
||||
|
Loading…
Reference in New Issue
Block a user