mirror of
https://github.com/revanced/revanced-patches
synced 2025-01-13 00:07:32 +01:00
feat(Twitch): Make patches compatible with latest versions (#4099)
This commit is contained in:
parent
b0cde785a1
commit
eecfbb7122
@ -21,7 +21,7 @@ val audioAdsPatch = bytecodePatch(
|
||||
addResourcesPatch,
|
||||
)
|
||||
|
||||
compatibleWith("tv.twitch.android.app"("15.4.1", "16.1.0", "16.9.1"))
|
||||
compatibleWith("tv.twitch.android.app")
|
||||
|
||||
execute {
|
||||
addResources("twitch", "ad.audio.audioAdsPatch")
|
||||
|
@ -19,7 +19,7 @@ val embeddedAdsPatch = bytecodePatch(
|
||||
settingsPatch,
|
||||
)
|
||||
|
||||
compatibleWith("tv.twitch.android.app"("15.4.1", "16.1.0", "16.9.1"))
|
||||
compatibleWith("tv.twitch.android.app")
|
||||
|
||||
execute {
|
||||
addResources("twitch", "ad.embedded.embeddedAdsPatch")
|
||||
|
@ -4,6 +4,6 @@ import app.revanced.patcher.fingerprint
|
||||
|
||||
internal val createsUsherClientFingerprint = fingerprint {
|
||||
custom { method, _ ->
|
||||
method.definingClass.endsWith("Ltv/twitch/android/network/OkHttpClientFactory;") && method.name == "buildOkHttpClient"
|
||||
method.name == "buildOkHttpClient" && method.definingClass.endsWith("Ltv/twitch/android/network/OkHttpClientFactory;")
|
||||
}
|
||||
}
|
||||
|
@ -141,14 +141,15 @@ val videoAdsPatch = bytecodePatch(
|
||||
)
|
||||
|
||||
// Spoof showAds JSON field.
|
||||
contentConfigShowAdsFingerprint.method.addInstructions(
|
||||
// Late versions of the app don't have the method anymore.
|
||||
contentConfigShowAdsFingerprint.methodOrNull?.addInstructions(
|
||||
0,
|
||||
"""
|
||||
${createConditionInstructions("v0")}
|
||||
const/4 v0, 0
|
||||
:$skipLabelName
|
||||
return v0
|
||||
""",
|
||||
${createConditionInstructions("v0")}
|
||||
const/4 v0, 0
|
||||
:$skipLabelName
|
||||
return v0
|
||||
""",
|
||||
)
|
||||
}
|
||||
},
|
||||
|
@ -22,7 +22,7 @@ val showDeletedMessagesPatch = bytecodePatch(
|
||||
addResourcesPatch,
|
||||
)
|
||||
|
||||
compatibleWith("tv.twitch.android.app"("15.4.1", "16.1.0", "16.9.1"))
|
||||
compatibleWith("tv.twitch.android.app")
|
||||
|
||||
fun createSpoilerConditionInstructions(register: String = "v0") = """
|
||||
invoke-static {}, Lapp/revanced/extension/twitch/patches/ShowDeletedMessagesPatch;->shouldUseSpoiler()Z
|
||||
|
@ -20,7 +20,7 @@ val autoClaimChannelPointsPatch = bytecodePatch(
|
||||
addResourcesPatch,
|
||||
)
|
||||
|
||||
compatibleWith("tv.twitch.android.app"("15.4.1", "16.1.0", "16.9.1"))
|
||||
compatibleWith("tv.twitch.android.app")
|
||||
|
||||
execute {
|
||||
addResources("twitch", "chat.autoclaim.autoClaimChannelPointsPatch")
|
||||
|
@ -48,13 +48,7 @@ val settingsPatch = bytecodePatch(
|
||||
settingsPatch(preferences = preferences),
|
||||
)
|
||||
|
||||
compatibleWith(
|
||||
"tv.twitch.android.app"(
|
||||
"15.4.1",
|
||||
"16.1.0",
|
||||
"16.9.1",
|
||||
),
|
||||
)
|
||||
compatibleWith("tv.twitch.android.app")
|
||||
|
||||
execute {
|
||||
addResources("twitch", "misc.settings.settingsPatch")
|
||||
|
Loading…
x
Reference in New Issue
Block a user