diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/video/patch/VideoAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/video/patch/VideoAdsPatch.kt index a6ab73cb..293368fc 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/video/patch/VideoAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/video/patch/VideoAdsPatch.kt @@ -6,6 +6,7 @@ import app.revanced.patcher.annotation.Version import app.revanced.patcher.data.implementation.BytecodeData import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.or +import app.revanced.patcher.patch.annotations.Dependencies import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.implementation.BytecodePatch import app.revanced.patcher.patch.implementation.misc.PatchResult @@ -20,7 +21,8 @@ import app.revanced.patches.youtube.ad.video.signatures.ShowVideoAdsConstructorS import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import org.jf.dexlib2.AccessFlags -@Patch(dependencies = [IntegrationsPatch::class]) +@Patch +@Dependencies(dependencies = [IntegrationsPatch::class]) @Name("video-ads") @Description("Patch to remove ads in the YouTube video player.") @VideoAdsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt index 7048842c..d7c82e3d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt @@ -5,6 +5,7 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Version import app.revanced.patcher.data.implementation.BytecodeData import app.revanced.patcher.extensions.addInstructions +import app.revanced.patcher.patch.annotations.Dependencies import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.implementation.BytecodePatch import app.revanced.patcher.patch.implementation.misc.PatchResult @@ -21,8 +22,8 @@ import org.jf.dexlib2.iface.Method import org.jf.dexlib2.iface.instruction.formats.Instruction11n import org.jf.dexlib2.iface.instruction.formats.Instruction35c - -@Patch(dependencies = [IntegrationsPatch::class]) +@Patch +@Dependencies(dependencies = [IntegrationsPatch::class]) @Name("seekbar-tapping") @Description("Enable tapping on the seekbar of the YouTube player.") @SeekbarTappingCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/amoled/patch/AmoledPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/amoled/patch/AmoledPatch.kt index a6f4fc7c..a4f28d56 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/amoled/patch/AmoledPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/amoled/patch/AmoledPatch.kt @@ -4,6 +4,7 @@ import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Version import app.revanced.patcher.data.implementation.ResourceData +import app.revanced.patcher.patch.annotations.Dependencies import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.implementation.ResourcePatch import app.revanced.patcher.patch.implementation.misc.PatchResult @@ -13,7 +14,8 @@ import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatc import org.w3c.dom.Element import java.io.File -@Patch( +@Patch +@Dependencies( dependencies = [ FixLocaleConfigErrorPatch::class ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/createbutton/patch/CreateButtonRemoverPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/createbutton/patch/CreateButtonRemoverPatch.kt index d4b343cc..b72c85a3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/createbutton/patch/CreateButtonRemoverPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/createbutton/patch/CreateButtonRemoverPatch.kt @@ -4,6 +4,7 @@ import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Version import app.revanced.patcher.data.implementation.BytecodeData +import app.revanced.patcher.patch.annotations.Dependencies import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.implementation.BytecodePatch import app.revanced.patcher.patch.implementation.misc.PatchResult @@ -16,7 +17,8 @@ import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import org.jf.dexlib2.Opcode import org.jf.dexlib2.iface.instruction.formats.Instruction35c -@Patch(dependencies = [IntegrationsPatch::class]) +@Patch +@Dependencies(dependencies = [IntegrationsPatch::class]) @Name("disable-create-button") @Description("Disable the create button.") @CreateButtonCompatibility @@ -32,8 +34,7 @@ class CreateButtonRemoverPatch : BytecodePatch( // Get the required register which holds the view object we need to pass to the method hideCreateButton val implementation = result.method.implementation!! val instruction = implementation.instructions[result.scanResult.endIndex + 1] - if (instruction.opcode != Opcode.INVOKE_STATIC) - return PatchResultError("Could not find the correct register") + if (instruction.opcode != Opcode.INVOKE_STATIC) return PatchResultError("Could not find the correct register") val register = (instruction as Instruction35c).registerC // Hide the button view via proxy by passing it to the hideCreateButton method diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/patch/OldQualityLayoutPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/patch/OldQualityLayoutPatch.kt index 2ba18245..730f68e4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/patch/OldQualityLayoutPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/patch/OldQualityLayoutPatch.kt @@ -6,6 +6,7 @@ import app.revanced.patcher.annotation.Version import app.revanced.patcher.data.implementation.BytecodeData import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.or +import app.revanced.patcher.patch.annotations.Dependencies import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.implementation.BytecodePatch import app.revanced.patcher.patch.implementation.misc.PatchResult @@ -22,7 +23,8 @@ import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.Opcode import org.jf.dexlib2.builder.instruction.BuilderInstruction21t -@Patch(dependencies = [IntegrationsPatch::class]) +@Patch +@Dependencies(dependencies = [IntegrationsPatch::class]) @Name("old-quality-layout") @Description("Enable the original quality flyout menu.") @OldQualityLayoutCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/patch/ShortsButtonRemoverPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/patch/ShortsButtonRemoverPatch.kt index 0c0b05f2..7d0e5d46 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/patch/ShortsButtonRemoverPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/patch/ShortsButtonRemoverPatch.kt @@ -4,6 +4,7 @@ import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Version import app.revanced.patcher.data.implementation.BytecodeData +import app.revanced.patcher.patch.annotations.Dependencies import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.implementation.BytecodePatch import app.revanced.patcher.patch.implementation.misc.PatchResult @@ -15,7 +16,8 @@ import app.revanced.patches.youtube.layout.shorts.button.signatures.PivotBarButt import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import org.jf.dexlib2.iface.instruction.formats.Instruction11x -@Patch(dependencies = [IntegrationsPatch::class]) +@Patch +@Dependencies(dependencies = [IntegrationsPatch::class]) @Name("shorts-button") @Description("Hide the shorts button.") @ShortsButtonCompatibility