mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-11 03:43:56 +01:00
feat(Peacock TV): Add Hide ads patch (#6348)
This commit is contained in:
@@ -573,6 +573,10 @@ public final class app/revanced/patches/pandora/misc/EnableUnlimitedSkipsPatchKt
|
||||
public static final fun getEnableUnlimitedSkipsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/peacocktv/ads/HideAdsPatchKt {
|
||||
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/photomath/detection/deviceid/SpoofDeviceIdPatchKt {
|
||||
public static final fun getGetDeviceIdPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package app.revanced.patches.peacocktv.ads
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val mediaTailerAdServiceFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
returns("Ljava/lang/Object")
|
||||
strings("Could not build MT Advertising service")
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package app.revanced.patches.peacocktv.ads
|
||||
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val hideAdsPatch = bytecodePatch(
|
||||
name = "Hide ads",
|
||||
description = "Hides all video ads.",
|
||||
) {
|
||||
compatibleWith("com.peacocktv.peacockandroid")
|
||||
|
||||
execute {
|
||||
mediaTailerAdServiceFingerprint.method.returnEarly(false)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user