mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 21:27:43 +02:00
refactor(enable-old-quality-layout): improve the patch method
This commit is contained in:
@ -3,10 +3,16 @@ package app.revanced.patches.youtube.video.quality.bytecode.fingerprints
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
object VideoQualitySettingsParentFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
parameters = listOf("[L", "I", "Z"),
|
||||
opcodes = listOf(
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.IF_EQ,
|
||||
Opcode.IF_EQ
|
||||
),
|
||||
strings = listOf("menu_item_video_quality")
|
||||
)
|
@ -58,8 +58,10 @@ class VideoQualityBytecodePatch : BytecodePatch(
|
||||
const-string v2, "$qIndexMethodName"
|
||||
invoke-static {p1, p2, v1, v2}, $INTEGRATIONS_VIDEO_QUALITY_CLASS_DESCRIPTOR->setVideoQuality([Ljava/lang/Object;ILjava/lang/Object;Ljava/lang/String;)I
|
||||
move-result p2
|
||||
"""
|
||||
"""
|
||||
)
|
||||
|
||||
LegacyVideoIdPatch.qualityOffSet = 5
|
||||
} ?: return VideoQualitySettingsParentFingerprint.toErrorResult()
|
||||
|
||||
LegacyVideoIdPatch.injectCall("$INTEGRATIONS_VIDEO_QUALITY_CLASS_DESCRIPTOR->newVideoStarted(Ljava/lang/String;)V")
|
||||
|
Reference in New Issue
Block a user