fix: twitch

This commit is contained in:
drobotk 2026-02-24 00:53:56 +01:00
parent c03b42138e
commit ae72cc2f29
No known key found for this signature in database
GPG key ID: 4B532DAB8340742C
2 changed files with 2 additions and 3 deletions

View file

@ -10,7 +10,7 @@ internal val BytecodePatchContext.checkAdEligibilityLambdaMethod by gettingFirst
parameterTypes("L")
}
internal val BytecodePatchContext.contentConfigShowAdsMethod by gettingFirstMethodDeclaratively {
internal val BytecodePatchContext.contentConfigShowAdsMethod by gettingFirstMethodDeclarativelyOrNull {
name("getShowAds")
definingClass("/ContentConfigData;")
returnType("Z")

View file

@ -14,7 +14,6 @@ import app.revanced.patches.twitch.misc.extension.sharedExtensionPatch
import app.revanced.patches.twitch.misc.settings.PreferenceScreen
import app.revanced.patches.twitch.misc.settings.settingsPatch
@Suppress("ObjectPropertyName")
val blockVideoAdsPatch = bytecodePatch(
name = "Block video ads",
description = "Blocks video ads in streams and VODs.",
@ -143,7 +142,7 @@ val blockVideoAdsPatch = bytecodePatch(
// Spoof showAds JSON field.
// Late versions of the app don't have the method anymore.
contentConfigShowAdsMethod.addInstructions(
contentConfigShowAdsMethod?.addInstructions(
0,
"""
${createConditionInstructions("v0")}