mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-13 05:37:40 +02:00
fix(YouTube/VideoInformation): Channel name not fetched in YouTube 19.34.42
This commit is contained in:
@ -187,10 +187,14 @@ val videoInformationPatch = bytecodePatch(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Pair<String, Fingerprint>.getPlayerResponseInstruction(returnType: String): String {
|
fun Pair<String, Fingerprint>.getPlayerResponseInstruction(returnType: String, fromString: Boolean? = null): String {
|
||||||
methodOrThrow().apply {
|
methodOrThrow().apply {
|
||||||
|
val startIndex = if (fromString == true)
|
||||||
|
matchOrThrow().stringMatches!!.first().index
|
||||||
|
else
|
||||||
|
0
|
||||||
val targetReference = getInstruction<ReferenceInstruction>(
|
val targetReference = getInstruction<ReferenceInstruction>(
|
||||||
indexOfFirstInstructionOrThrow {
|
indexOfFirstInstructionOrThrow(startIndex) {
|
||||||
val reference = getReference<MethodReference>()
|
val reference = getReference<MethodReference>()
|
||||||
(opcode == Opcode.INVOKE_INTERFACE_RANGE || opcode == Opcode.INVOKE_INTERFACE) &&
|
(opcode == Opcode.INVOKE_INTERFACE_RANGE || opcode == Opcode.INVOKE_INTERFACE) &&
|
||||||
reference?.definingClass == PLAYER_RESPONSE_MODEL_CLASS_DESCRIPTOR &&
|
reference?.definingClass == PLAYER_RESPONSE_MODEL_CLASS_DESCRIPTOR &&
|
||||||
@ -289,7 +293,7 @@ val videoInformationPatch = bytecodePatch(
|
|||||||
channelIdMethodCall =
|
channelIdMethodCall =
|
||||||
channelIdFingerprint.getPlayerResponseInstruction("Ljava/lang/String;")
|
channelIdFingerprint.getPlayerResponseInstruction("Ljava/lang/String;")
|
||||||
channelNameMethodCall =
|
channelNameMethodCall =
|
||||||
channelNameFingerprint.getPlayerResponseInstruction("Ljava/lang/String;")
|
channelNameFingerprint.getPlayerResponseInstruction("Ljava/lang/String;", true)
|
||||||
videoIdMethodCall = videoIdFingerprint.getPlayerResponseInstruction("Ljava/lang/String;")
|
videoIdMethodCall = videoIdFingerprint.getPlayerResponseInstruction("Ljava/lang/String;")
|
||||||
videoTitleMethodCall =
|
videoTitleMethodCall =
|
||||||
videoTitleFingerprint.getPlayerResponseInstruction("Ljava/lang/String;")
|
videoTitleFingerprint.getPlayerResponseInstruction("Ljava/lang/String;")
|
||||||
|
Reference in New Issue
Block a user