diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autorepeat/annotations/AutoRepeatCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/annotations/AutoRepeatCompatibility.kt similarity index 83% rename from src/main/kotlin/app/revanced/patches/youtube/layout/autorepeat/annotations/AutoRepeatCompatibility.kt rename to src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/annotations/AutoRepeatCompatibility.kt index 30a8c29c..b4c826c1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autorepeat/annotations/AutoRepeatCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/annotations/AutoRepeatCompatibility.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.layout.autorepeat.annotations +package app.revanced.patches.youtube.misc.autorepeat.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autorepeat/fingerprints/AutoRepeatFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/fingerprints/AutoRepeatFingerprint.kt similarity index 77% rename from src/main/kotlin/app/revanced/patches/youtube/layout/autorepeat/fingerprints/AutoRepeatFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/fingerprints/AutoRepeatFingerprint.kt index 83722beb..c5a65f4e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autorepeat/fingerprints/AutoRepeatFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/fingerprints/AutoRepeatFingerprint.kt @@ -1,12 +1,12 @@ -package app.revanced.patches.youtube.layout.autorepeat.fingerprints +package app.revanced.patches.youtube.misc.autorepeat.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.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod -import app.revanced.patches.youtube.layout.autorepeat.annotations.AutoRepeatCompatibility +import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint +import app.revanced.patches.youtube.misc.autorepeat.annotations.AutoRepeatCompatibility import org.jf.dexlib2.AccessFlags @Name("auto-repeat-fingerprint") @@ -25,8 +25,8 @@ public final void ae() { object AutoRepeatFingerprint : MethodFingerprint( "V", AccessFlags.PUBLIC or AccessFlags.FINAL, + listOf(), null, null, - null, - customFingerprint = { methodDef -> methodDef.implementation!!.instructions.count() == 3 } + customFingerprint = { methodDef -> methodDef.implementation!!.instructions.count() == 3 && methodDef.annotations.isEmpty()} ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autorepeat/fingerprints/AutoRepeatParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/fingerprints/AutoRepeatParentFingerprint.kt similarity index 87% rename from src/main/kotlin/app/revanced/patches/youtube/layout/autorepeat/fingerprints/AutoRepeatParentFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/fingerprints/AutoRepeatParentFingerprint.kt index 6f60ac67..a4d0c02f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autorepeat/fingerprints/AutoRepeatParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/fingerprints/AutoRepeatParentFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.layout.autorepeat.fingerprints +package app.revanced.patches.youtube.misc.autorepeat.fingerprints import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Version @@ -6,7 +6,7 @@ import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod -import app.revanced.patches.youtube.layout.autorepeat.annotations.AutoRepeatCompatibility +import app.revanced.patches.youtube.misc.autorepeat.annotations.AutoRepeatCompatibility import org.jf.dexlib2.AccessFlags @Name("auto-repeat-parent-fingerprint") diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autorepeat/patch/AutoRepeatPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/patch/AutoRepeatPatch.kt similarity index 88% rename from src/main/kotlin/app/revanced/patches/youtube/layout/autorepeat/patch/AutoRepeatPatch.kt rename to src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/patch/AutoRepeatPatch.kt index c429a68b..8d567d59 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autorepeat/patch/AutoRepeatPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/patch/AutoRepeatPatch.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.layout.autorepeat.patch +package app.revanced.patches.youtube.misc.autorepeat.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name @@ -13,9 +13,9 @@ import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Dependencies import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.impl.BytecodePatch -import app.revanced.patches.youtube.layout.autorepeat.annotations.AutoRepeatCompatibility -import app.revanced.patches.youtube.layout.autorepeat.fingerprints.AutoRepeatFingerprint -import app.revanced.patches.youtube.layout.autorepeat.fingerprints.AutoRepeatParentFingerprint +import app.revanced.patches.youtube.misc.autorepeat.annotations.AutoRepeatCompatibility +import app.revanced.patches.youtube.misc.autorepeat.fingerprints.AutoRepeatFingerprint +import app.revanced.patches.youtube.misc.autorepeat.fingerprints.AutoRepeatParentFingerprint import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch @Patch(include = false) @@ -50,8 +50,7 @@ class AutoRepeatPatch : BytecodePatch( invoke-static {}, Lapp/revanced/integrations/patches/AutoRepeatPatch;->shouldAutoRepeat()Z move-result v0 if-eqz v0, :noautorepeat - const/4 v0, 0x0 - invoke-virtual {}, $methodToCall + invoke-virtual {p0}, $methodToCall :noautorepeat return-void """