fix: Remove version numbers from individual patches (#2709)

This commit is contained in:
LisoUseInAIKyrios
2023-07-28 22:11:23 +04:00
committed by GitHub
parent d1ccf093cc
commit d97f3990c9
177 changed files with 14 additions and 355 deletions
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.autorepeat.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.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
@@ -26,7 +25,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Always autorepeat")
@Description("Always repeats the playing video again.")
@AutoRepeatCompatibility
@Version("0.0.1")
class AutoRepeatPatch : BytecodePatch(
listOf(
AutoRepeatParentFingerprint
@@ -50,7 +48,7 @@ class AutoRepeatPatch : BytecodePatch(
val playMethod = parentResult.mutableMethod
AutoRepeatFingerprint.resolve(context, parentResult.classDef)
//String is: Laamp;->E()V
val methodToCall = playMethod.definingClass + "->" + playMethod.name + "()V";
val methodToCall = playMethod.definingClass + "->" + playMethod.name + "()V"
//This is the method we search for
val result = AutoRepeatFingerprint.result
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.debugging.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
@@ -20,7 +19,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Description("Adds debugging options.")
@DebuggingCompatibility
@Version("0.0.2")
class DebuggingPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.MISC.addPreferences(
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.fix.backtoexitgesture.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
@@ -19,7 +18,6 @@ import app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints.Recy
@Description("Fixes the swipe back to exit gesture.")
@FixBackToExitGestureCompatibility
@Version("0.0.1")
class FixBackToExitGesturePatch : BytecodePatch(
listOf(
RecyclerViewTopScrollingParentFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.misc.fix.playback.patch
import app.revanced.extensions.toErrorResult
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.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -21,7 +20,6 @@ import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
@Description("Spoofs a patched client to allow playback.")
@ClientSpoofCompatibility
@DependsOn([SpoofSignatureVerificationPatch::class])
@Version("0.0.1")
class ClientSpoofPatch : BytecodePatch(
listOf(UserAgentHeaderBuilderFingerprint)
) {
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.misc.fix.playback.patch
import app.revanced.extensions.toErrorResult
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.data.toMethodWalker
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -27,7 +26,6 @@ import org.jf.dexlib2.iface.instruction.ReferenceInstruction
IntegrationsPatch::class,
PlayerTypeHookPatch::class
])
@Version("0.0.1")
class SpoofSignatureVerificationPatch : BytecodePatch(
listOf(
ProtobufParameterBuilderFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.misc.links.open.patch
import app.revanced.extensions.toErrorResult
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.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
@@ -23,7 +22,6 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction21c
@Name("Open links externally")
@Description("Open links outside of the app directly in your browser.")
@OpenLinksExternallyCompatibility
@Version("0.0.1")
class OpenLinksExternallyPatch : BytecodePatch(
listOf(
GetCustomTabPackageNameFingerprint,
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.litho.filter.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -31,7 +30,6 @@ import java.io.Closeable
@DependsOn([IntegrationsPatch::class])
@Description("Hooks the method which parses the bytes into a ComponentContext to filter components.")
@Version("0.0.1")
class LithoFilterPatch : BytecodePatch(
listOf(ComponentContextParserFingerprint, LithoFilterFingerprint, ProtobufBufferReferenceFingerprint)
), Closeable {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.microg.patch.bytecode
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.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
@@ -30,7 +29,6 @@ import app.revanced.util.microg.MicroGBytecodeHelper
@Name("Vanced MicroG support")
@Description("Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG.")
@MicroGPatchCompatibility
@Version("0.0.1")
class MicroGBytecodePatch : BytecodePatch(
listOf(
ServiceCheckFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.misc.minimizedplayback.patch
import app.revanced.extensions.toErrorResult
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.data.toMethodWalker
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
@@ -33,7 +32,6 @@ import org.jf.dexlib2.iface.reference.MethodReference
@Description("Enables minimized and background playback.")
@DependsOn([IntegrationsPatch::class, PlayerTypeHookPatch::class, SettingsPatch::class])
@MinimizedPlaybackCompatibility
@Version("0.0.1")
class MinimizedPlaybackPatch : BytecodePatch(
listOf(
MinimizedPlaybackManagerFingerprint,
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.playercontrols.bytecode.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.InstructionExtensions.addInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
@@ -20,7 +19,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@DependsOn([BottomControlsResourcePatch::class])
@Description("Manages the code for the player controls of the YouTube player.")
@PlayerControlsCompatibility
@Version("0.0.1")
class PlayerControlsBytecodePatch : BytecodePatch(
listOf(PlayerControlsVisibilityFingerprint, BottomControlsInflateFingerprint)
) {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.playeroverlay.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.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch
@@ -16,7 +15,6 @@ import app.revanced.patches.youtube.misc.playeroverlay.fingerprint.PlayerOverlay
@Name("Player overlays hook")
@Description("Hook for adding custom overlays to the video player.")
@PlayerOverlaysHookCompatibility
@Version("0.0.1")
@DependsOn([IntegrationsPatch::class])
class PlayerOverlaysHookPatch : BytecodePatch(
listOf(
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.misc.playertype.patch
import app.revanced.extensions.toErrorResult
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.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -21,7 +20,6 @@ import org.jf.dexlib2.iface.instruction.ReferenceInstruction
@Name("Player type hook")
@Description("Hook to get the current player type and video playback state.")
@PlayerTypeHookCompatibility
@Version("0.0.1")
@DependsOn([IntegrationsPatch::class])
class PlayerTypeHookPatch : BytecodePatch(
listOf(PlayerTypeFingerprint, VideoStateFingerprint)
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.misc.settings.bytecode.patch
import app.revanced.extensions.toErrorResult
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.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -24,10 +23,9 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.util.MethodUtil
import java.io.Closeable
@DependsOn([IntegrationsPatch::class, SettingsResourcePatch::class, ])
@DependsOn([IntegrationsPatch::class, SettingsResourcePatch::class])
@Name("Settings")
@Description("Adds settings for ReVanced to YouTube.")
@Version("0.0.1")
class SettingsPatch : BytecodePatch(
listOf(LicenseActivityFingerprint, SetThemeFingerprint)
), Closeable {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.zoomhaptics.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.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -23,7 +22,6 @@ import app.revanced.patches.youtube.misc.zoomhaptics.fingerprints.ZoomHapticsFin
@Description("Disables haptics when zooming.")
@DependsOn([SettingsPatch::class])
@ZoomHapticsCompatibility
@Version("0.0.1")
class ZoomHapticsPatch : BytecodePatch(
listOf(ZoomHapticsFingerprint)
) {