mirror of
https://github.com/revanced/revanced-patches
synced 2025-02-21 08:06:49 +01:00
fix(YouTube - Client spoof): fix toast shown if opening paid or age restricted video (#482)
This commit is contained in:
parent
f63f35814a
commit
ae0bc79acb
@ -48,6 +48,11 @@ public class StoryBoardRendererRequester {
|
|||||||
if (responseCode == 200) {
|
if (responseCode == 200) {
|
||||||
final JSONObject playerResponse = Requester.parseJSONObject(connection);
|
final JSONObject playerResponse = Requester.parseJSONObject(connection);
|
||||||
|
|
||||||
|
if (!playerResponse.has("storyboards")) {
|
||||||
|
// Video is age restricted or paid.
|
||||||
|
LogHelper.printDebug(() -> "Video has no public storyboard: " + videoId);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
final JSONObject storyboards = playerResponse.getJSONObject("storyboards");
|
final JSONObject storyboards = playerResponse.getJSONObject("storyboards");
|
||||||
final String storyboardsRendererTag = storyboards.has("playerLiveStoryboardSpecRenderer")
|
final String storyboardsRendererTag = storyboards.has("playerLiveStoryboardSpecRenderer")
|
||||||
? "playerLiveStoryboardSpecRenderer"
|
? "playerLiveStoryboardSpecRenderer"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user