mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-04 16:44:29 +02:00
fix(YouTube/Spoof player parameters): error toast shown when you first launch the app
This commit is contained in:
parent
78da7f9ccd
commit
2eee2018fe
@ -80,7 +80,7 @@ object SpoofPlayerParameterPatch : BytecodePatch(
|
|||||||
* Hook player parameter
|
* Hook player parameter
|
||||||
*/
|
*/
|
||||||
PlayerResponsePatch += PlayerResponsePatch.Hook.PlayerParameter(
|
PlayerResponsePatch += PlayerResponsePatch.Hook.PlayerParameter(
|
||||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->spoofParameter(Ljava/lang/String;Z)Ljava/lang/String;"
|
"$INTEGRATIONS_CLASS_DESCRIPTOR->spoofParameter(Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/String;"
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,7 +31,7 @@ object PlayerResponsePatch : BytecodePatch(
|
|||||||
|
|
||||||
fun hookPlayerParameter(hook: Hook) = playerResponseMethod.addInstructions(
|
fun hookPlayerParameter(hook: Hook) = playerResponseMethod.addInstructions(
|
||||||
0, """
|
0, """
|
||||||
invoke-static {p$PLAYER_PARAMETER, p$IS_SHORT_AND_OPENING_OR_PLAYING_PARAMETER}, $hook
|
invoke-static {p$VIDEO_ID_PARAMETER, p$PLAYER_PARAMETER, p$IS_SHORT_AND_OPENING_OR_PLAYING_PARAMETER}, $hook
|
||||||
move-result-object p$PLAYER_PARAMETER
|
move-result-object p$PLAYER_PARAMETER
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
@ -155,7 +155,8 @@ object VideoIdPatch : BytecodePatch(
|
|||||||
// Call before any other video id hooks,
|
// Call before any other video id hooks,
|
||||||
// so they can use VideoInformation and check if the video id is for a Short.
|
// so they can use VideoInformation and check if the video id is for a Short.
|
||||||
PlayerResponsePatch += PlayerResponsePatch.Hook.PlayerBeforeVideoId(
|
PlayerResponsePatch += PlayerResponsePatch.Hook.PlayerBeforeVideoId(
|
||||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->newPlayerResponseSignature(Ljava/lang/String;Z)Ljava/lang/String;")
|
"$INTEGRATIONS_CLASS_DESCRIPTOR->newPlayerParameter(Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/String;"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const val INTEGRATIONS_CLASS_DESCRIPTOR = "$VIDEO_PATH/VideoInformation;"
|
const val INTEGRATIONS_CLASS_DESCRIPTOR = "$VIDEO_PATH/VideoInformation;"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user