add: resource patcher
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
package app.revanced.patches.youtube.layout
|
||||
|
||||
import app.revanced.patcher.PatcherData
|
||||
import app.revanced.patcher.data.implementation.BytecodeData
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.patch.*
|
||||
import app.revanced.patcher.patch.implementation.BytecodePatch
|
||||
import app.revanced.patcher.patch.implementation.metadata.PackageMetadata
|
||||
import app.revanced.patcher.patch.implementation.metadata.PatchMetadata
|
||||
import app.revanced.patcher.patch.implementation.misc.PatchResult
|
||||
import app.revanced.patcher.patch.implementation.misc.PatchResultSuccess
|
||||
import app.revanced.patcher.signature.MethodMetadata
|
||||
import app.revanced.patcher.signature.MethodSignature
|
||||
import app.revanced.patcher.signature.MethodSignatureMetadata
|
||||
@@ -19,7 +23,7 @@ private val compatiblePackages = listOf(
|
||||
)
|
||||
)
|
||||
|
||||
class MinimizedPlaybackPatch : Patch(
|
||||
class MinimizedPlaybackPatch : BytecodePatch(
|
||||
PatchMetadata(
|
||||
"minimized-playback",
|
||||
"Minimized Playback Patch",
|
||||
@@ -70,7 +74,7 @@ class MinimizedPlaybackPatch : Patch(
|
||||
)
|
||||
)
|
||||
) {
|
||||
override fun execute(patcherData: PatcherData): PatchResult {
|
||||
override fun execute(data: BytecodeData): PatchResult {
|
||||
// Instead of removing all instructions like Vanced,
|
||||
// we return the method at the beginning instead
|
||||
signatures.first().result!!.method.implementation!!.addInstructions(
|
||||
|
||||
Reference in New Issue
Block a user