fix: crunchyroll

This commit is contained in:
drobotk 2026-02-24 12:39:18 +01:00
parent ae72cc2f29
commit a5023524d8
No known key found for this signature in database
GPG key ID: 4B532DAB8340742C

View file

@ -18,11 +18,11 @@ val hideAdsPatch = bytecodePatch("Hide ads") {
apply { apply {
// Get obfuscated "enableAds" field from toString method. // Get obfuscated "enableAds" field from toString method.
val enableAdsField = videoUrlReadyToStringMethodMatch.method.apply { val enableAdsField = videoUrlReadyToStringMethodMatch.method.let {
val stringIndex = videoUrlReadyToStringMethodMatch[-1] val stringIndex = videoUrlReadyToStringMethodMatch[-1]
val fieldIndex = indexOfFirstInstruction(stringIndex, Opcode.IGET_BOOLEAN) val fieldIndex = it.indexOfFirstInstruction(stringIndex, Opcode.IGET_BOOLEAN)
getInstruction<ReferenceInstruction>(fieldIndex).getReference<FieldReference>()!! it.getInstruction<ReferenceInstruction>(fieldIndex).getReference<FieldReference>()!!
} }
// Remove final access flag on field. // Remove final access flag on field.