feat(crunchyroll): remove enable-downloads patch

This commit is contained in:
oSumAtrIX 2022-12-18 01:23:26 +01:00
parent c4a3099c1c
commit 2ac15460f5
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4
3 changed files with 0 additions and 73 deletions

View file

@ -1,13 +0,0 @@
package app.revanced.patches.crunchyroll.downloads.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[
Package("com.crunchyroll.crunchyroid")
]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class DownloadsCompatibility

View file

@ -1,23 +0,0 @@
package app.revanced.patches.crunchyroll.downloads.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.crunchyroll.downloads.annotations.DownloadsCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("downloads-fingerprint")
@DownloadsCompatibility
@Version("0.0.1")
object DownloadsFingerprint : MethodFingerprint(
"Z", AccessFlags.PUBLIC or AccessFlags.FINAL, null,
opcodes = listOf(
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.RETURN
),
strings = listOf("offline_viewing"),
)

View file

@ -1,37 +0,0 @@
package app.revanced.patches.crunchyroll.downloads.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.crunchyroll.downloads.annotations.DownloadsCompatibility
import app.revanced.patches.crunchyroll.downloads.fingerprints.DownloadsFingerprint
@Patch
@Name("enable-downloads")
@Description("Enables downloads for Crunchyroll.")
@DownloadsCompatibility
@Version("0.0.1")
class DownloadsPatch : BytecodePatch(
listOf(
DownloadsFingerprint
)
) {
override fun execute(context: BytecodeContext): PatchResult {
with(DownloadsFingerprint.result!!.mutableMethod) {
val index = implementation!!.instructions.lastIndex
replaceInstruction(
index - 1,
"""
const/4 v0, 0x1
"""
)
}
return PatchResultSuccess()
}
}