mirror of
https://github.com/revanced/revanced-patches
synced 2024-12-29 10:05:51 +01:00
feat(Bandcamp): Add Remove play limits
patch (#3366)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
102862775a
commit
ad8d3bb1c8
@ -181,6 +181,12 @@ public final class app/revanced/patches/backdrops/misc/pro/ProUnlockPatch : app/
|
||||
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/bandcamp/limitations/RemovePlayLimitsPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||
public static final field INSTANCE Lapp/revanced/patches/bandcamp/limitations/RemovePlayLimitsPatch;
|
||||
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/candylinkvpn/UnlockProPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||
public static final field INSTANCE Lapp/revanced/patches/candylinkvpn/UnlockProPatch;
|
||||
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||
|
@ -0,0 +1,23 @@
|
||||
package app.revanced.patches.bandcamp.limitations
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.bandcamp.limitations.fingerprints.HandlePlaybackLimitsPatch
|
||||
import app.revanced.util.exception
|
||||
|
||||
@Patch(
|
||||
name = "Remove play limits",
|
||||
description = "Disables purchase nagging and playback limits of not purchased tracks.",
|
||||
compatiblePackages = [CompatiblePackage("com.bandcamp.android")],
|
||||
)
|
||||
@Suppress("unused")
|
||||
object RemovePlayLimitsPatch : BytecodePatch(
|
||||
setOf(HandlePlaybackLimitsPatch),
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) =
|
||||
HandlePlaybackLimitsPatch.result?.mutableMethod?.addInstructions(0, "return-void")
|
||||
?: throw HandlePlaybackLimitsPatch.exception
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package app.revanced.patches.bandcamp.limitations.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
internal object HandlePlaybackLimitsPatch : MethodFingerprint(
|
||||
strings = listOf("play limits processing track", "found play_count"),
|
||||
)
|
Loading…
Reference in New Issue
Block a user