diff --git a/src/main/kotlin/app/revanced/patches/all/misc/debugging/patch/DebuggingPatc.kt b/src/main/kotlin/app/revanced/patches/all/misc/debugging/patch/EnableAndroidDebuggingPatch.kt similarity index 96% rename from src/main/kotlin/app/revanced/patches/all/misc/debugging/patch/DebuggingPatc.kt rename to src/main/kotlin/app/revanced/patches/all/misc/debugging/patch/EnableAndroidDebuggingPatch.kt index 0a4dfae9c..4143f1c2d 100644 --- a/src/main/kotlin/app/revanced/patches/all/misc/debugging/patch/DebuggingPatc.kt +++ b/src/main/kotlin/app/revanced/patches/all/misc/debugging/patch/EnableAndroidDebuggingPatch.kt @@ -5,7 +5,6 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Version import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.patch.* -import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import org.w3c.dom.Element diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/general/annotation/GeneralAdsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/general/annotation/GeneralAdsCompatibility.kt index 3560b8147..7562a7977 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/general/annotation/GeneralAdsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/general/annotation/GeneralAdsCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/video/annotations/VideoAdsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/video/annotations/VideoAdsCompatibility.kt index 163353849..2bc4ce2df 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/video/annotations/VideoAdsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/video/annotations/VideoAdsCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/annotation/CopyVideoUrlCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/annotation/CopyVideoUrlCompatibility.kt index 313c2f2b8..4f4e524b0 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/annotation/CopyVideoUrlCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/annotation/CopyVideoUrlCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/annotation/DownloadsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/annotation/DownloadsCompatibility.kt index 15f5b8419..7d0d31281 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/annotation/DownloadsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/annotation/DownloadsCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/annotation/SeekbarTappingCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/annotation/SeekbarTappingCompatibility.kt index b9f287107..c85c1bf7a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/annotation/SeekbarTappingCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/annotation/SeekbarTappingCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/annotation/SwipeControlsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/annotation/SwipeControlsCompatibility.kt index b217cbbed..5def19efa 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/annotation/SwipeControlsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/annotation/SwipeControlsCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/annotations/AutoCaptionsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/annotations/AutoCaptionsCompatibility.kt index 3d2010909..ac4e86824 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/annotations/AutoCaptionsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/annotations/AutoCaptionsCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/annotations/HideButtonsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/annotations/HideButtonsCompatibility.kt index 1abfd93ab..78c8fdd91 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/annotations/HideButtonsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/annotations/HideButtonsCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/annotations/AutoplayButtonCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/annotations/AutoplayButtonCompatibility.kt index 5ec82ebce..9f32c59f3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/annotations/AutoplayButtonCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/annotations/AutoplayButtonCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/annotations/HideCaptionsButtonCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/annotations/HideCaptionsButtonCompatibility.kt index 7bce79a2a..8069cab27 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/annotations/HideCaptionsButtonCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/annotations/HideCaptionsButtonCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/pivotbar/shared/annotations/PivotBarCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/pivotbar/shared/annotations/PivotBarCompatibility.kt index 64b22133a..087005bb3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/pivotbar/shared/annotations/PivotBarCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/pivotbar/shared/annotations/PivotBarCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/background/annotations/PlayerButtonBackgroundCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/background/annotations/PlayerButtonBackgroundCompatibility.kt index b3d8a4a5d..92d2f756e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/background/annotations/PlayerButtonBackgroundCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/background/annotations/PlayerButtonBackgroundCompatibility.kt @@ -13,7 +13,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/annotations/AlbumCardsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/annotations/AlbumCardsCompatibility.kt index d69330041..b89120ae4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/annotations/AlbumCardsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/annotations/AlbumCardsCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/artistcards/annotations/HideArtistCardCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/artistcards/annotations/HideArtistCardCompatibility.kt index 0d0799a5f..637728f6f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/artistcards/annotations/HideArtistCardCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/artistcards/annotations/HideArtistCardCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/annotations/BreakingNewsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/annotations/BreakingNewsCompatibility.kt index 4bd60942d..ee2cd1a76 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/annotations/BreakingNewsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/annotations/BreakingNewsCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/annotations/CommentsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/annotations/CommentsCompatibility.kt index 7fa3e0f76..a110c894c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/annotations/CommentsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/annotations/CommentsCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/annotations/CrowdfundingBoxCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/annotations/CrowdfundingBoxCompatibility.kt index f61f1f2b3..df20612b5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/annotations/CrowdfundingBoxCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/annotations/CrowdfundingBoxCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/annotations/HideEndScreenCardsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/annotations/HideEndscreenCardsCompatibility.kt similarity index 92% rename from src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/annotations/HideEndScreenCardsCompatibility.kt rename to src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/annotations/HideEndscreenCardsCompatibility.kt index 397822fdd..f756c99fe 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/annotations/HideEndScreenCardsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/annotations/HideEndscreenCardsCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/annotations/HideFloatingMicrophoneButtonCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/annotations/HideFloatingMicrophoneButtonCompatibility.kt index 2cb65f028..fdada61ab 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/annotations/HideFloatingMicrophoneButtonCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/annotations/HideFloatingMicrophoneButtonCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/annotations/HideInfocardsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/annotations/HideInfocardsCompatibility.kt index 931a8cbe8..a3d68e940 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/annotations/HideInfocardsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/annotations/HideInfocardsCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/mixplaylists/annotations/MixPlaylistsPatchCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/mixplaylists/annotations/MixPlaylistsPatchCompatibility.kt deleted file mode 100644 index 08237e9cf..000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/mixplaylists/annotations/MixPlaylistsPatchCompatibility.kt +++ /dev/null @@ -1,22 +0,0 @@ -package app.revanced.patches.youtube.layout.hide.mixplaylists.annotations - -import app.revanced.patcher.annotation.Compatibility -import app.revanced.patcher.annotation.Package - -@Compatibility( - [Package( - "com.google.android.youtube", arrayOf( - "17.49.37", - "18.03.36", - "18.03.42", - "18.04.35", - "18.04.41", - "18.05.32", - "18.05.35", - "18.05.40", - "18.08.37" - ) - )] -) -@Target(AnnotationTarget.CLASS) -internal annotation class MixPlaylistsPatchCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/mixplaylists/fingerprints/CreateMixPlaylistFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/mixplaylists/fingerprints/CreateMixPlaylistFingerprint.kt deleted file mode 100644 index d0182ef88..000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/mixplaylists/fingerprints/CreateMixPlaylistFingerprint.kt +++ /dev/null @@ -1,24 +0,0 @@ -package app.revanced.patches.youtube.layout.hide.mixplaylists.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import org.jf.dexlib2.AccessFlags -import org.jf.dexlib2.Opcode - -object CreateMixPlaylistFingerprint : MethodFingerprint( - "V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L", "L", "L", "L", "L"), listOf( - Opcode.INVOKE_DIRECT, - Opcode.IPUT_OBJECT, - Opcode.INVOKE_VIRTUAL, - Opcode.IPUT_OBJECT, - Opcode.IPUT_OBJECT, - Opcode.IPUT_OBJECT, - Opcode.IPUT_OBJECT, - Opcode.NEW_INSTANCE, - Opcode.INVOKE_DIRECT, - Opcode.IPUT_OBJECT, - Opcode.IPUT_OBJECT, - Opcode.IPUT_OBJECT, - Opcode.INVOKE_VIRTUAL, - ) -) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/mixplaylists/fingerprints/SecondCreateMixPlaylistFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/mixplaylists/fingerprints/SecondCreateMixPlaylistFingerprint.kt deleted file mode 100644 index 3e454663f..000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/mixplaylists/fingerprints/SecondCreateMixPlaylistFingerprint.kt +++ /dev/null @@ -1,24 +0,0 @@ -package app.revanced.patches.youtube.layout.hide.mixplaylists.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import org.jf.dexlib2.AccessFlags -import org.jf.dexlib2.Opcode - -object SecondCreateMixPlaylistFingerprint : MethodFingerprint( - "V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L", "L", "L", "L"), listOf( - Opcode.INVOKE_DIRECT, - Opcode.IPUT_OBJECT, - Opcode.INVOKE_VIRTUAL, - Opcode.IPUT_OBJECT, - Opcode.IPUT_OBJECT, - Opcode.IPUT_OBJECT, - Opcode.IPUT_OBJECT, - Opcode.NEW_INSTANCE, - Opcode.INVOKE_DIRECT, - Opcode.IPUT_OBJECT, - Opcode.IPUT_OBJECT, - Opcode.INVOKE_VIRTUAL, - Opcode.RETURN_VOID - ) -) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/mixplaylists/patch/MixPlaylistsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/mixplaylists/patch/MixPlaylistsPatch.kt deleted file mode 100644 index a8373325f..000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/mixplaylists/patch/MixPlaylistsPatch.kt +++ /dev/null @@ -1,64 +0,0 @@ -package app.revanced.patches.youtube.layout.hide.mixplaylists.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.addInstruction -import app.revanced.patcher.extensions.instruction -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchResult -import app.revanced.patcher.patch.PatchResultSuccess -import app.revanced.patcher.patch.annotations.DependsOn -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.shared.settings.preference.impl.StringResource -import app.revanced.patches.shared.settings.preference.impl.SwitchPreference -import app.revanced.patches.youtube.layout.hide.mixplaylists.annotations.MixPlaylistsPatchCompatibility -import app.revanced.patches.youtube.layout.hide.mixplaylists.fingerprints.CreateMixPlaylistFingerprint -import app.revanced.patches.youtube.layout.hide.mixplaylists.fingerprints.SecondCreateMixPlaylistFingerprint -import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -import org.jf.dexlib2.iface.instruction.OneRegisterInstruction - -@Patch -@DependsOn([IntegrationsPatch::class]) -@Name("hide-my-mix") -@Description("Hides mix playlists.") -@MixPlaylistsPatchCompatibility -@Version("0.0.1") -class MixPlaylistsPatch : BytecodePatch( - listOf( - CreateMixPlaylistFingerprint, SecondCreateMixPlaylistFingerprint - ) -) { - override fun execute(context: BytecodeContext): PatchResult { - SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( - SwitchPreference( - "revanced_hide_mix_playlists", - StringResource("revanced_hide_mix_playlists_title", "Hide mix playlists"), - false, - StringResource("revanced_hide_mix_playlists_summary_on", "Mix playlists are hidden"), - StringResource("revanced_hide_mix_playlists_summary_off", "Mix playlists are shown") - ) - ) - - arrayOf(CreateMixPlaylistFingerprint, SecondCreateMixPlaylistFingerprint).forEach(::addHook) - - return PatchResultSuccess() - } - - private fun addHook(fingerprint: MethodFingerprint) { - with (fingerprint.result!!) { - val insertIndex = scanResult.patternScanResult!!.endIndex - 3 - - val register = (mutableMethod.instruction(insertIndex - 2) as OneRegisterInstruction).registerA - - mutableMethod.addInstruction( - insertIndex, - "invoke-static {v$register}, Lapp/revanced/integrations/patches/HideMixPlaylistsPatch;->hideMixPlaylists(Landroid/view/View;)V" - ) - } - - } -} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/annotations/HideEmailAddressCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/annotations/HideEmailAddressCompatibility.kt index a4f0ce845..237a27691 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/annotations/HideEmailAddressCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/annotations/HideEmailAddressCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/annotations/HideSeekbarCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/annotations/HideSeekbarCompatibility.kt index 1fd33ec99..893b4c4e8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/annotations/HideSeekbarCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/annotations/HideSeekbarCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/annotations/HideTimeCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/annotations/HideTimeCompatibility.kt index 6646bb1aa..c1d67cd02 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/annotations/HideTimeCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/annotations/HideTimeCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watchinvr/annotations/WatchinVRCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watchinvr/annotations/WatchinVRCompatibility.kt index 57439d1de..94f11946a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watchinvr/annotations/WatchinVRCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watchinvr/annotations/WatchinVRCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/annotations/HideWaterwarkCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/annotations/HideWaterwarkCompatibility.kt index 1e2cb301e..922cf1eb4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/annotations/HideWaterwarkCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/annotations/HideWaterwarkCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/annotations/OldQualityLayoutCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/annotations/OldQualityLayoutCompatibility.kt index 446c1750e..c6dbfa470 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/annotations/OldQualityLayoutCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/annotations/OldQualityLayoutCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/annotations/FullscreenPanelsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/annotations/FullscreenPanelsCompatibility.kt index 43472021d..bbfa21ded 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/annotations/FullscreenPanelsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/annotations/FullscreenPanelsCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/annotations/PlayerPopupPanelsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/annotations/PlayerPopupPanelsCompatibility.kt index b83c3003d..ac678e6ea 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/annotations/PlayerPopupPanelsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/annotations/PlayerPopupPanelsCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/annotations/ReturnYouTubeDislikeCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/annotations/ReturnYouTubeDislikeCompatibility.kt index d3f7bd41c..19d4d4cbe 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/annotations/ReturnYouTubeDislikeCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/annotations/ReturnYouTubeDislikeCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.08.37"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.15.40"))]) @Target(AnnotationTarget.CLASS) internal annotation class ReturnYouTubeDislikeCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/ShortsTextComponentParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/ShortsTextComponentParentFingerprint.kt index 27e529824..f4e6f7801 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/ShortsTextComponentParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/ShortsTextComponentParentFingerprint.kt @@ -1,13 +1,10 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints -import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.Opcode object ShortsTextComponentParentFingerprint : MethodFingerprint( returnType = "V", - access = AccessFlags.PROTECTED or AccessFlags.FINAL, parameters = listOf("L", "L"), opcodes = listOf( Opcode.INVOKE_STATIC, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentAtomicReferenceFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentAtomicReferenceFingerprint.kt index c555cb827..2385aa904 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentAtomicReferenceFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentAtomicReferenceFingerprint.kt @@ -16,15 +16,16 @@ object TextComponentAtomicReferenceFingerprint : MethodFingerprint( Opcode.MOVE_OBJECT, // available unused register Opcode.MOVE_OBJECT_FROM16, Opcode.MOVE_OBJECT_FROM16, - Opcode.MOVE_FROM16, + Opcode.MOVE_OBJECT_FROM16, + Opcode.MOVE_OBJECT_FROM16, Opcode.INVOKE_VIRTUAL, // CharSequence atomic reference Opcode.MOVE_RESULT_OBJECT, Opcode.CHECK_CAST, Opcode.MOVE_OBJECT, // CharSequence reference, and control flow label. Insert code here. - Opcode.INVOKE_VIRTUAL_RANGE, + Opcode.INVOKE_VIRTUAL, Opcode.MOVE_RESULT, Opcode.IF_EQZ, - Opcode.INVOKE_VIRTUAL_RANGE, + Opcode.INVOKE_VIRTUAL, Opcode.MOVE_RESULT_OBJECT, Opcode.GOTO, Opcode.CONST_4, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/patch/ReturnYouTubeDislikePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/patch/ReturnYouTubeDislikePatch.kt index 3796ee62b..0f5ff3c88 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/patch/ReturnYouTubeDislikePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/patch/ReturnYouTubeDislikePatch.kt @@ -26,6 +26,7 @@ import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch import app.revanced.patches.youtube.misc.video.videoid.patch.VideoIdPatch import org.jf.dexlib2.builder.instruction.BuilderInstruction35c +import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.ReferenceInstruction import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @@ -101,14 +102,15 @@ class ReturnYouTubeDislikePatch : BytecodePatch( textComponentContextFingerprintResult.mutableMethod.apply { // Get the conversion context obfuscated field name, and the registers for the AtomicReference and CharSequence - val conversionContextFieldName = - (instruction(conversionContextIndex) as ReferenceInstruction).reference.toString() - val contextRegister = // any free register + val conversionContextFieldReference = + (instruction(conversionContextIndex) as ReferenceInstruction).reference + // any free register + val contextRegister = (instruction(atomicReferenceStartIndex) as TwoRegisterInstruction).registerB val atomicReferenceRegister = - (instruction(atomicReferenceStartIndex + 4) as BuilderInstruction35c).registerC + (instruction(atomicReferenceStartIndex + 5) as FiveRegisterInstruction).registerC - val insertIndex = atomicReferenceStartIndex + 7 + val insertIndex = atomicReferenceStartIndex + 8 val moveCharSequenceInstruction = instruction(insertIndex) as TwoRegisterInstruction val charSequenceRegister = moveCharSequenceInstruction.registerB @@ -117,10 +119,10 @@ class ReturnYouTubeDislikePatch : BytecodePatch( replaceInstruction(insertIndex, "move-object/from16 v$contextRegister, p0") addInstructions( insertIndex + 1, """ - iget-object v$contextRegister, v$contextRegister, $conversionContextFieldName # copy obfuscated context field into free register + iget-object v$contextRegister, v$contextRegister, $conversionContextFieldReference # copy obfuscated context field into free register invoke-static {v$contextRegister, v$atomicReferenceRegister, v$charSequenceRegister}, $INTEGRATIONS_PATCH_CLASS_DESCRIPTOR->onLithoTextLoaded(Ljava/lang/Object;Ljava/util/concurrent/atomic/AtomicReference;Ljava/lang/CharSequence;)Ljava/lang/CharSequence; move-result-object v$charSequenceRegister - move-object v${moveCharSequenceInstruction.registerA}, v${moveCharSequenceInstruction.registerB} # original instruction at the insertion point + move-object v${moveCharSequenceInstruction.registerA}, v${charSequenceRegister} # original instruction at the insertion point """ ) } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/annotations/WideSearchbarCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/annotations/WideSearchbarCompatibility.kt index 91f712441..00908cd17 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/annotations/WideSearchbarCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/annotations/WideSearchbarCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/fingerprints/CreateSearchSuggestionsFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/fingerprints/CreateSearchSuggestionsFingerprint.kt new file mode 100644 index 000000000..bef00e2f3 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/fingerprints/CreateSearchSuggestionsFingerprint.kt @@ -0,0 +1,13 @@ +package app.revanced.patches.youtube.layout.searchbar.fingerprints + +import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint +import org.jf.dexlib2.Opcode + +object CreateSearchSuggestionsFingerprint : MethodFingerprint( + opcodes = listOf( + Opcode.INVOKE_STATIC, + Opcode.MOVE_RESULT, + Opcode.CONST_4 + ), + strings = listOf("ss_rds") +) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/fingerprints/DrawActionBarFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/fingerprints/DrawActionBarFingerprint.kt deleted file mode 100644 index 4dd3f4aef..000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/fingerprints/DrawActionBarFingerprint.kt +++ /dev/null @@ -1,27 +0,0 @@ -package app.revanced.patches.youtube.layout.searchbar.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import org.jf.dexlib2.AccessFlags -import org.jf.dexlib2.Opcode - -object DrawActionBarFingerprint : MethodFingerprint( - "V", - AccessFlags.PRIVATE or AccessFlags.FINAL, - listOf("I", "I"), - listOf( - Opcode.INVOKE_STATIC, - Opcode.MOVE_RESULT_OBJECT, - Opcode.INVOKE_VIRTUAL, - Opcode.MOVE_RESULT_OBJECT, - Opcode.SGET_OBJECT, - Opcode.INVOKE_VIRTUAL, - Opcode.IGET_OBJECT, - Opcode.INVOKE_VIRTUAL, - Opcode.IGET_OBJECT, - Opcode.CONST, - Opcode.INVOKE_VIRTUAL, - Opcode.IGET_OBJECT, - Opcode.INVOKE_STATIC, - ), -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/patch/WideSearchbarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/patch/WideSearchbarPatch.kt index 4f43625e1..62bd87fe9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/patch/WideSearchbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/patch/WideSearchbarPatch.kt @@ -17,51 +17,22 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patches.shared.settings.preference.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.SwitchPreference import app.revanced.patches.youtube.layout.searchbar.annotations.WideSearchbarCompatibility -import app.revanced.patches.youtube.layout.searchbar.fingerprints.DrawActionBarFingerprint +import app.revanced.patches.youtube.layout.searchbar.fingerprints.CreateSearchSuggestionsFingerprint import app.revanced.patches.youtube.layout.searchbar.fingerprints.SetWordmarkHeaderFingerprint import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch @Patch @DependsOn([IntegrationsPatch::class, SettingsPatch::class]) -@Name("enable-wide-searchbar") +@Name("wide-searchbar") @Description("Replaces the search icon with a wide search bar. This will hide the YouTube logo when active.") @WideSearchbarCompatibility @Version("0.0.1") class WideSearchbarPatch : BytecodePatch( listOf( - SetWordmarkHeaderFingerprint, DrawActionBarFingerprint + SetWordmarkHeaderFingerprint, CreateSearchSuggestionsFingerprint ) ) { - private companion object { - /** - * Walk a fingerprints method at a given index mutably. - * - * @param index The index to walk at. - * @param fromFingerprint The fingerprint to walk the method on. - * @return The [MutableMethod] which was walked on. - */ - fun BytecodeContext.walkMutable(index: Int, fromFingerprint: MethodFingerprint) = - fromFingerprint.result?.let { - toMethodWalker(it.method).nextMethod(index, true).getMethod() as MutableMethod - } ?: throw SetWordmarkHeaderFingerprint.toErrorResult() - - - /** - * Injects instructions required for certain methods. - * - */ - fun MutableMethod.injectSearchBarHook() { - addInstructions( - implementation!!.instructions.size - 1, - """ - invoke-static {}, Lapp/revanced/integrations/patches/NewActionbarPatch;->getNewActionBar()Z - move-result p0 - """ - ) - } - } - override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( @@ -73,16 +44,45 @@ class WideSearchbarPatch : BytecodePatch( ) ) - val result = DrawActionBarFingerprint.result ?: return DrawActionBarFingerprint.toErrorResult() + val result = CreateSearchSuggestionsFingerprint.result ?: return CreateSearchSuggestionsFingerprint.toErrorResult() // patch methods mapOf( SetWordmarkHeaderFingerprint to 1, - DrawActionBarFingerprint to result.scanResult.patternScanResult!!.endIndex + CreateSearchSuggestionsFingerprint to result.scanResult.patternScanResult!!.startIndex ).forEach { (fingerprint, callIndex) -> context.walkMutable(callIndex, fingerprint).injectSearchBarHook() } return PatchResultSuccess() } + + private companion object { + /** + * Walk a fingerprints method at a given index mutably. + * + * @param index The index to walk at. + * @param fromFingerprint The fingerprint to walk the method on. + * @return The [MutableMethod] which was walked on. + */ + fun BytecodeContext.walkMutable(index: Int, fromFingerprint: MethodFingerprint) = + fromFingerprint.result?.let { + toMethodWalker(it.method).nextMethod(index, true).getMethod() as MutableMethod + } ?: throw fromFingerprint.toErrorResult() + + + /** + * Injects instructions required for certain methods. + * + */ + fun MutableMethod.injectSearchBarHook() { + addInstructions( + implementation!!.instructions.size - 1, + """ + invoke-static {}, Lapp/revanced/integrations/patches/WideSearchbarPatch;->enableWideSearchbar()Z + move-result p0 + """ + ) + } + } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/annotations/SponsorBlockCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/annotations/SponsorBlockCompatibility.kt index c60f83030..fa5230cc3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/annotations/SponsorBlockCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/annotations/SponsorBlockCompatibility.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package @Compatibility( - [Package("com.google.android.youtube", arrayOf("18.08.37"))] + [Package("com.google.android.youtube", arrayOf("18.08.37", "18.15.40"))] ) @Target(AnnotationTarget.CLASS) internal annotation class SponsorBlockCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt index a73fc2060..931fbfd56 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt @@ -21,7 +21,9 @@ import app.revanced.patches.shared.fingerprints.SeekbarFingerprint import app.revanced.patches.shared.fingerprints.SeekbarOnDrawFingerprint import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility -import app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints.* +import app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints.AppendTimeFingerprint +import app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints.PlayerOverlaysLayoutInitFingerprint +import app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints.RectangleFieldInvalidatorFingerprint import app.revanced.patches.youtube.layout.sponsorblock.resource.patch.SponsorBlockResourcePatch import app.revanced.patches.youtube.misc.autorepeat.fingerprints.AutoRepeatFingerprint import app.revanced.patches.youtube.misc.autorepeat.fingerprints.AutoRepeatParentFingerprint @@ -153,14 +155,22 @@ class SponsorBlockBytecodePatch : BytecodePatch( /* * Draw segment */ - val drawSegmentInstructionInsertIndex = (seekbarMethodInstructions.size - 1 - 2) - val (canvasInstance, centerY) = (seekbarMethodInstructions[drawSegmentInstructionInsertIndex] as FiveRegisterInstruction).let { - it.registerC to it.registerE + + // Find the drawCircle call and draw the segment before it + for (i in seekbarMethodInstructions.size - 1 downTo 0) { + val invokeInstruction = seekbarMethodInstructions[i] as? ReferenceInstruction ?: continue + if ((invokeInstruction.reference as MethodReference).name != "drawCircle") continue + + val (canvasInstance, centerY) = (invokeInstruction as FiveRegisterInstruction).let { + it.registerC to it.registerE + } + seekbarMethod.addInstruction( + i, + "invoke-static {v$canvasInstance, v$centerY}, $INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR->drawSponsorTimeBars(Landroid/graphics/Canvas;F)V" + ) + + break } - seekbarMethod.addInstruction( - drawSegmentInstructionInsertIndex, - "invoke-static {v$canvasInstance, v$centerY}, $INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR->drawSponsorTimeBars(Landroid/graphics/Canvas;F)V" - ) /* * Voting & Shield button diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/annotations/SpoofAppVersionCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/annotations/SpoofAppVersionCompatibility.kt index b65016ffb..88864d534 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/annotations/SpoofAppVersionCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/annotations/SpoofAppVersionCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/annotations/StartupShortsResetCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/annotations/StartupShortsResetCompatibility.kt index 82c1b333b..99cecd5fa 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/annotations/StartupShortsResetCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/annotations/StartupShortsResetCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/annotations/TabletMiniPlayerCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/annotations/TabletMiniPlayerCompatibility.kt index 61651c1b5..c0fef1f1b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/annotations/TabletMiniPlayerCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/annotations/TabletMiniPlayerCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.tabletminiplayer.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.08.37"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.15.40"))]) @Target(AnnotationTarget.CLASS) internal annotation class TabletMiniPlayerCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideParentFingerprint.kt index 49a394933..14593d31f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideParentFingerprint.kt @@ -9,5 +9,5 @@ object MiniPlayerOverrideParentFingerprint : MethodFingerprint( returnType = "L", access = AccessFlags.PUBLIC or AccessFlags.STATIC, parameters = listOf("L"), - strings = listOf("VIDEO_QUALITIES_QUICK_MENU_BOTTOM_SHEET_FRAGMENT") + strings = listOf("PLAYBACK_RATE_MENU_BOTTOM_SHEET_FRAGMENT") ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/patch/TabletMiniPlayerPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/patch/TabletMiniPlayerPatch.kt index a290173e6..8769448d1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/patch/TabletMiniPlayerPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/patch/TabletMiniPlayerPatch.kt @@ -67,10 +67,9 @@ class TabletMiniPlayerPatch : BytecodePatch( */ MiniPlayerOverrideParentFingerprint.result?.let { if (!MiniPlayerOverrideFingerprint.resolve(context, it.classDef)) - return MiniPlayerOverrideFingerprint.toErrorResult() + throw MiniPlayerOverrideFingerprint.toErrorResult() MiniPlayerOverrideFingerprint.addProxyCall() - } ?: return MiniPlayerOverrideParentFingerprint.toErrorResult() /* diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/annotations/AutoRepeatCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/annotations/AutoRepeatCompatibility.kt index 001061ae0..24f13f952 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/annotations/AutoRepeatCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/annotations/AutoRepeatCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/debugging/patch/DebuggingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/debugging/patch/DebuggingPatch.kt index 8a2a8c88e..ef0dba238 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/debugging/patch/DebuggingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/debugging/patch/DebuggingPatch.kt @@ -4,16 +4,17 @@ 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.* +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess +import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patches.all.misc.debugging.patch.EnableAndroidDebuggingPatch import app.revanced.patches.shared.settings.preference.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.SwitchPreference import app.revanced.patches.youtube.misc.debugging.annotations.DebuggingCompatibility import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import app.revanced.patches.all.misc.debugging.patch.EnableAndroidDebuggingPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -import org.w3c.dom.Element @Patch @Name("enable-debugging") diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/annotation/FixBackToExitGestureCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/annotation/FixBackToExitGestureCompatibility.kt index 88d68b981..aef6513c4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/annotation/FixBackToExitGestureCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/annotation/FixBackToExitGestureCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/annotation/ProtobufSpoofCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/annotation/ProtobufSpoofCompatibility.kt index 698a4f0bf..5d010ecd0 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/annotation/ProtobufSpoofCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/annotation/ProtobufSpoofCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/annotations/HDRBrightnessCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/annotations/HDRBrightnessCompatibility.kt index 9c7bba1e2..361aefb71 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/annotations/HDRBrightnessCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/annotations/HDRBrightnessCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/annotations/IntegrationsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/annotations/IntegrationsCompatibility.kt index 96fc2e7fc..3d152580b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/annotations/IntegrationsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/annotations/IntegrationsCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/annotations/OpenLinksExternallyCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/annotations/OpenLinksExternallyCompatibility.kt index 169c4dff8..737ceabb8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/annotations/OpenLinksExternallyCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/annotations/OpenLinksExternallyCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/annotation/LithoFilterCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/annotation/LithoFilterCompatibility.kt index d89900243..40811ebb2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/annotation/LithoFilterCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/annotation/LithoFilterCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ComponentContextParserFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ComponentContextParserFingerprint.kt index a57ae700f..498f7ca25 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ComponentContextParserFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ComponentContextParserFingerprint.kt @@ -9,5 +9,5 @@ object ComponentContextParserFingerprint : MethodFingerprint( Opcode.IPUT_OBJECT, Opcode.NEW_INSTANCE ), - strings = listOf("LoggingProperties are not in proto format") + strings = listOf("Component was not found %s because it was removed due to duplicate converter bindings") ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/patch/LithoFilterPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/patch/LithoFilterPatch.kt index 96dfba82c..f5174c190 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/patch/LithoFilterPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/patch/LithoFilterPatch.kt @@ -10,7 +10,6 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.PatchResult -import app.revanced.patcher.patch.PatchResultError import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.util.smali.ExternalLabel @@ -22,6 +21,7 @@ import app.revanced.patches.youtube.misc.litho.filter.fingerprints.ReadComponent import org.jf.dexlib2.iface.instruction.Instruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @DependsOn([IntegrationsPatch::class]) @Description("Hooks the method which parses the bytes into a ComponentContext to filter components.") @@ -44,15 +44,15 @@ class LithoFilterPatch : BytecodePatch( val insertHookIndex = result.scanResult.patternScanResult!!.endIndex val builderMethodDescriptor = instruction(builderMethodIndex).descriptor val emptyComponentFieldDescriptor = instruction(emptyComponentFieldIndex).descriptor - // Register is overwritten right after it is used for this patch, therefore free to clobber. - val clobberedRegister = instruction(insertHookIndex).oneRegister + // Register is overwritten right after it is used in this patch, therefore free to clobber. + val clobberedRegister = instruction(insertHookIndex - 1).twoRegisterA @Suppress("UnnecessaryVariable") // The register, this patch clobbers, is previously used for the StringBuilder, // later on a new StringBuilder is instantiated on it. val stringBuilderRegister = clobberedRegister - val identifierRegister = instruction(ReadComponentIdentifierFingerprint.patternScanEndIndex).oneRegister + val identifierRegister = instruction(ReadComponentIdentifierFingerprint.patternScanEndIndex).oneRegisterA addInstructions( insertHookIndex, // right after setting the component.pathBuilder field, @@ -69,7 +69,7 @@ class LithoFilterPatch : BytecodePatch( listOf(ExternalLabel("not_an_ad", instruction(insertHookIndex))) ) } - } ?: return PatchResultError("Could not find the method to hook.") + } ?: return ComponentContextParserFingerprint.toErrorResult() return PatchResultSuccess() } @@ -81,8 +81,10 @@ class LithoFilterPatch : BytecodePatch( val Instruction.descriptor get() = (this as ReferenceInstruction).reference.toString() - val Instruction.oneRegister + val Instruction.oneRegisterA get() = (this as OneRegisterInstruction).registerA + val Instruction.twoRegisterA + get() = (this as TwoRegisterInstruction).registerA } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/annotations/MicroGPatchCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/annotations/MicroGPatchCompatibility.kt index 65ffd1898..b417cadc9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/annotations/MicroGPatchCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/annotations/MicroGPatchCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/annotations/MinimizedPlaybackCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/annotations/MinimizedPlaybackCompatibility.kt index fe77a8aec..1750ba254 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/annotations/MinimizedPlaybackCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/annotations/MinimizedPlaybackCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/annotation/PlayerControlsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/annotation/PlayerControlsCompatibility.kt index c5114acc6..2914b4572 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/annotation/PlayerControlsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/annotation/PlayerControlsCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playeroverlay/annotation/PlayerOverlaysHookCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playeroverlay/annotation/PlayerOverlaysHookCompatibility.kt index c41ad4f16..e8fa925f9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playeroverlay/annotation/PlayerOverlaysHookCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playeroverlay/annotation/PlayerOverlaysHookCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/annotation/PlayerTypeHookCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/annotation/PlayerTypeHookCompatibility.kt index a54f3aada..e88b256f6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/annotation/PlayerTypeHookCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/annotation/PlayerTypeHookCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/annotation/VideoInformationCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/annotation/VideoInformationCompatibility.kt index d90f70008..8981abf35 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/annotation/VideoInformationCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/annotation/VideoInformationCompatibility.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package @Compatibility( - [Package("com.google.android.youtube", arrayOf("18.08.37"))] + [Package("com.google.android.youtube", arrayOf("18.08.37", "18.15.40"))] ) @Target(AnnotationTarget.CLASS) internal annotation class VideoInformationCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/annotations/RememberVideoQualityCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/annotations/RememberVideoQualityCompatibility.kt index ffb5921b5..a7cf8ae6a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/annotations/RememberVideoQualityCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/annotations/RememberVideoQualityCompatibility.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package @Compatibility( - [Package("com.google.android.youtube", arrayOf("18.08.37"))] + [Package("com.google.android.youtube", arrayOf("18.08.37", "18.15.40"))] ) @Target(AnnotationTarget.CLASS) internal annotation class RememberVideoQualityCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/annotations/CustomPlaybackSpeedCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/annotations/CustomPlaybackSpeedCompatibility.kt index 1cb9593e0..c03162b63 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/annotations/CustomPlaybackSpeedCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/annotations/CustomPlaybackSpeedCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/remember/annotation/RememberPlaybackSpeedCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/remember/annotation/RememberPlaybackSpeedCompatibility.kt index 39a5f7a9b..11e62479c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/remember/annotation/RememberPlaybackSpeedCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/remember/annotation/RememberPlaybackSpeedCompatibility.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package @Compatibility( - [Package("com.google.android.youtube", arrayOf("18.08.37"))] + [Package("com.google.android.youtube", arrayOf("18.08.37", "18.15.40"))] ) @Target(AnnotationTarget.CLASS) internal annotation class RememberPlaybackSpeedCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/annotation/VideoIdCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/annotation/VideoIdCompatibility.kt index 35ba3251a..89e6ab114 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/annotation/VideoIdCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/annotation/VideoIdCompatibility.kt @@ -14,7 +14,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/videobuffer/annotations/CustomVideoBufferCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/videobuffer/annotations/CustomVideoBufferCompatibility.kt index 98e8f802b..aac6db67f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/videobuffer/annotations/CustomVideoBufferCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/videobuffer/annotations/CustomVideoBufferCompatibility.kt @@ -15,7 +15,8 @@ import app.revanced.patcher.annotation.Package "18.05.32", "18.05.35", "18.05.40", - "18.08.37" + "18.08.37", + "18.15.40" ) )] )