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 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 {
|
||||||
|
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user