mirror of
https://github.com/revanced/revanced-patches
synced 2025-01-13 02:57:34 +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,
|
addResourcesPatch,
|
||||||
)
|
)
|
||||||
|
|
||||||
compatibleWith("tv.twitch.android.app"("15.4.1", "16.1.0", "16.9.1"))
|
compatibleWith("tv.twitch.android.app")
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
addResources("twitch", "ad.audio.audioAdsPatch")
|
addResources("twitch", "ad.audio.audioAdsPatch")
|
||||||
|
@ -19,7 +19,7 @@ val embeddedAdsPatch = bytecodePatch(
|
|||||||
settingsPatch,
|
settingsPatch,
|
||||||
)
|
)
|
||||||
|
|
||||||
compatibleWith("tv.twitch.android.app"("15.4.1", "16.1.0", "16.9.1"))
|
compatibleWith("tv.twitch.android.app")
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
addResources("twitch", "ad.embedded.embeddedAdsPatch")
|
addResources("twitch", "ad.embedded.embeddedAdsPatch")
|
||||||
|
@ -4,6 +4,6 @@ import app.revanced.patcher.fingerprint
|
|||||||
|
|
||||||
internal val createsUsherClientFingerprint = fingerprint {
|
internal val createsUsherClientFingerprint = fingerprint {
|
||||||
custom { method, _ ->
|
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.
|
// Spoof showAds JSON field.
|
||||||
contentConfigShowAdsFingerprint.method.addInstructions(
|
// Late versions of the app don't have the method anymore.
|
||||||
|
contentConfigShowAdsFingerprint.methodOrNull?.addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
${createConditionInstructions("v0")}
|
${createConditionInstructions("v0")}
|
||||||
const/4 v0, 0
|
const/4 v0, 0
|
||||||
:$skipLabelName
|
:$skipLabelName
|
||||||
return v0
|
return v0
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -22,7 +22,7 @@ val showDeletedMessagesPatch = bytecodePatch(
|
|||||||
addResourcesPatch,
|
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") = """
|
fun createSpoilerConditionInstructions(register: String = "v0") = """
|
||||||
invoke-static {}, Lapp/revanced/extension/twitch/patches/ShowDeletedMessagesPatch;->shouldUseSpoiler()Z
|
invoke-static {}, Lapp/revanced/extension/twitch/patches/ShowDeletedMessagesPatch;->shouldUseSpoiler()Z
|
||||||
|
@ -20,7 +20,7 @@ val autoClaimChannelPointsPatch = bytecodePatch(
|
|||||||
addResourcesPatch,
|
addResourcesPatch,
|
||||||
)
|
)
|
||||||
|
|
||||||
compatibleWith("tv.twitch.android.app"("15.4.1", "16.1.0", "16.9.1"))
|
compatibleWith("tv.twitch.android.app")
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
addResources("twitch", "chat.autoclaim.autoClaimChannelPointsPatch")
|
addResources("twitch", "chat.autoclaim.autoClaimChannelPointsPatch")
|
||||||
|
@ -48,13 +48,7 @@ val settingsPatch = bytecodePatch(
|
|||||||
settingsPatch(preferences = preferences),
|
settingsPatch(preferences = preferences),
|
||||||
)
|
)
|
||||||
|
|
||||||
compatibleWith(
|
compatibleWith("tv.twitch.android.app")
|
||||||
"tv.twitch.android.app"(
|
|
||||||
"15.4.1",
|
|
||||||
"16.1.0",
|
|
||||||
"16.9.1",
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
addResources("twitch", "misc.settings.settingsPatch")
|
addResources("twitch", "misc.settings.settingsPatch")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user