From beb933d8fc252d02f6bf505dcc53d763d382f9f0 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 1 Apr 2024 16:48:46 +0400 Subject: [PATCH 1/9] feat(YouTube): Support version 19.10`, `19.11` and `19.12` --- api/revanced-patches.api | 1 + .../autoplay/HideAutoplayButtonPatch.kt | 4 ++-- .../hide/shorts/HideShortsComponentsPatch.kt | 3 ++- .../HideShortsComponentsResourcePatch.kt | 7 +++---- .../CreateShortsButtonsFingerprint.kt | 5 +---- ...erDimensionsCalculatorParentFingerprint.kt | 2 +- .../kotlin/app/revanced/util/BytecodeUtils.kt | 19 ++++++++++++++++--- 7 files changed, 26 insertions(+), 15 deletions(-) diff --git a/api/revanced-patches.api b/api/revanced-patches.api index 4bba02a523..28f813bcbd 100644 --- a/api/revanced-patches.api +++ b/api/revanced-patches.api @@ -1819,6 +1819,7 @@ public final class app/revanced/util/BytecodeUtilsKt { public static final fun containsWideLiteralInstructionValue (Lcom/android/tools/smali/dexlib2/iface/Method;J)Z public static final fun findIndexForIdResource (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/String;)I public static final fun findMutableMethodOf (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableClass;Lcom/android/tools/smali/dexlib2/iface/Method;)Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod; + public static final fun firstIndexForIdResource (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/String;)I public static final fun getException (Lapp/revanced/patcher/fingerprint/MethodFingerprint;)Lapp/revanced/patcher/patch/PatchException; public static final fun indexOfFirstInstruction (Lcom/android/tools/smali/dexlib2/iface/Method;Lkotlin/jvm/functions/Function1;)I public static final fun indexOfFirstWideLiteralInstructionValue (Lcom/android/tools/smali/dexlib2/iface/Method;J)I diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt index d96caab792..037609b3c3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt @@ -14,7 +14,7 @@ import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.SettingsPatch import app.revanced.patches.youtube.shared.fingerprints.LayoutConstructorFingerprint import app.revanced.util.exception -import app.revanced.util.findIndexForIdResource +import app.revanced.util.firstIndexForIdResource import com.android.tools.smali.dexlib2.iface.instruction.Instruction import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction @@ -69,7 +69,7 @@ object HideAutoplayButtonPatch : BytecodePatch( val layoutGenMethodInstructions = implementation!!.instructions // resolve the offsets of where to insert the branch instructions and ... - val insertIndex = findIndexForIdResource("autonav_preview_stub") + val insertIndex = firstIndexForIdResource("autonav_preview_stub") // where to branch away val branchIndex = diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt index e65eced6ce..e43a598e9b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt @@ -16,6 +16,7 @@ import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch import app.revanced.patches.youtube.misc.litho.filter.LithoFilterPatch import app.revanced.patches.youtube.misc.navigation.NavigationBarHookPatch import app.revanced.patches.youtube.misc.playertype.PlayerTypeHookPatch +import app.revanced.util.firstIndexForIdResource import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction @@ -159,7 +160,7 @@ object HideShortsComponentsPatch : BytecodePatch( SHARE("reel_dyn_share", "hideShortsShareButton"); fun injectHideCall(method: MutableMethod) { - val referencedIndex = method.findIndexForIdResource(resourceName) + val referencedIndex = method.firstIndexForIdResource(resourceName) val setIdIndex = referencedIndex + 1 val viewRegister = method.getInstruction(setIdIndex).registerC diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt index 8593cd056f..7b80feade4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt @@ -52,9 +52,8 @@ object HideShortsComponentsResourcePatch : ResourcePatch() { reelMultipleItemShelfId = it.id } - reelPlayerRightCellButtonHeight = - ResourceMappingPatch.resourceMappings.single { - it.type == "dimen" && it.name == "reel_player_right_cell_button_height" - }.id + reelPlayerRightCellButtonHeight = ResourceMappingPatch.resourceMappings.first { + it.type == "dimen" && it.name == "reel_player_right_cell_button_height" + }.id } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/fingerprints/CreateShortsButtonsFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/fingerprints/CreateShortsButtonsFingerprint.kt index 97ac691213..da5cdc634c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/fingerprints/CreateShortsButtonsFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/fingerprints/CreateShortsButtonsFingerprint.kt @@ -1,13 +1,10 @@ package app.revanced.patches.youtube.layout.hide.shorts.fingerprints -import app.revanced.patcher.extensions.or import app.revanced.patches.youtube.layout.hide.shorts.HideShortsComponentsResourcePatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.AccessFlags internal object CreateShortsButtonsFingerprint : LiteralValueFingerprint( - accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL, + // YT 19.12.x moved this code inside another method, and each method has different parameters. returnType = "V", - parameters = listOf("Z", "Z", "L"), literalSupplier = { HideShortsComponentsResourcePatch.reelPlayerRightCellButtonHeight } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerDimensionsCalculatorParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerDimensionsCalculatorParentFingerprint.kt index 244bf33d0f..2e1612373b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerDimensionsCalculatorParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerDimensionsCalculatorParentFingerprint.kt @@ -12,7 +12,7 @@ internal object MiniPlayerDimensionsCalculatorParentFingerprint : MethodFingerpr opcodes = listOf( Opcode.CONST_HIGH16, Opcode.ADD_FLOAT_2ADDR, - Opcode.MUL_FLOAT, + null, // Opcode.MUL_FLOAT or Opcode.MUL_FLOAT_2ADDR Opcode.CONST_4, Opcode.INVOKE_STATIC, Opcode.MOVE_RESULT, diff --git a/src/main/kotlin/app/revanced/util/BytecodeUtils.kt b/src/main/kotlin/app/revanced/util/BytecodeUtils.kt index 8daf777020..bf5f759f06 100644 --- a/src/main/kotlin/app/revanced/util/BytecodeUtils.kt +++ b/src/main/kotlin/app/revanced/util/BytecodeUtils.kt @@ -70,13 +70,26 @@ fun MutableMethod.injectHideViewCall( * * @param resourceName the name of the resource to find the id for. * @return the index of the first instruction with the id of the given resource name, or -1 if not found. + * @see [firstIndexForIdResource] */ fun Method.findIndexForIdResource(resourceName: String): Int { - fun getIdResourceId(resourceName: String) = ResourceMappingPatch.resourceMappings.single { + val resource = ResourceMappingPatch.resourceMappings.find { it.type == "id" && it.name == resourceName - }.id + } ?: throw PatchException("Could not find resource id: $resourceName") - return indexOfFirstWideLiteralInstructionValue(getIdResourceId(resourceName)) + return indexOfFirstWideLiteralInstructionValue(resource.id) +} + +/** + * Identical to [findIndexForIdResource], except this throws an exception if the method does not contain + * the resource id literal value. + * + * @throws [PatchException] if the resource is not found, or the method does not contain the resource id literal value. + */ +fun Method.firstIndexForIdResource(resourceName: String): Int { + val index = findIndexForIdResource(resourceName); + if (index < 0) throw PatchException("Found resource id for: '$resourceName' but method does not contain the id: $this") + return index; } /** From 8dd0917c028ba428875e2d56bdbf9eeee36eadf4 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 1 Apr 2024 16:54:31 +0400 Subject: [PATCH 2/9] bump version numbers --- .../app/revanced/patches/youtube/ad/general/HideAdsPatch.kt | 6 +++++- .../patches/youtube/ad/getpremium/HideGetPremiumPatch.kt | 6 +++++- .../app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt | 6 +++++- .../interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt | 6 +++++- .../interaction/dialog/RemoveViewerDiscretionDialogPatch.kt | 6 +++++- .../patches/youtube/interaction/downloads/DownloadsPatch.kt | 6 +++++- .../seekbar/DisablePreciseSeekingGesturePatch.kt | 6 +++++- .../interaction/seekbar/EnableSeekbarTappingPatch.kt | 6 +++++- .../youtube/interaction/seekbar/EnableSlideToSeekPatch.kt | 6 +++++- .../interaction/swipecontrols/SwipeControlsBytecodePatch.kt | 6 +++++- .../youtube/layout/autocaptions/AutoCaptionsPatch.kt | 6 +++++- .../youtube/layout/buttons/action/HideButtonsPatch.kt | 6 +++++- .../layout/buttons/autoplay/HideAutoplayButtonPatch.kt | 6 +++++- .../layout/buttons/captions/HideCaptionsButtonPatch.kt | 6 +++++- .../layout/buttons/navigation/NavigationButtonsPatch.kt | 4 ++++ .../layout/buttons/player/hide/HidePlayerButtonsPatch.kt | 6 +++++- .../youtube/layout/hide/albumcards/AlbumCardsPatch.kt | 6 +++++- .../youtube/layout/hide/breakingnews/BreakingNewsPatch.kt | 6 +++++- .../patches/youtube/layout/hide/comments/CommentsPatch.kt | 6 +++++- .../layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt | 6 +++++- .../layout/hide/endscreencards/HideEndscreenCardsPatch.kt | 6 +++++- .../youtube/layout/hide/filterbar/HideFilterBarPatch.kt | 6 +++++- .../floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt | 6 +++++- .../DisableFullscreenAmbientModePatch.kt | 6 +++++- .../layout/hide/general/HideLayoutComponentsPatch.kt | 4 ++++ .../youtube/layout/hide/infocards/HideInfoCardsPatch.kt | 6 +++++- .../layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt | 6 +++++- .../player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt | 6 +++++- .../rollingnumber/DisableRollingNumberAnimationPatch.kt | 6 +++++- .../patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt | 6 +++++- .../youtube/layout/hide/shorts/HideShortsComponentsPatch.kt | 6 +++++- .../DisableSuggestedVideoEndScreenPatch.kt | 6 +++++- .../patches/youtube/layout/hide/time/HideTimestampPatch.kt | 6 +++++- .../youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt | 6 +++++- .../player/background/PlayerControlsBackgroundPatch.kt | 6 +++++- .../returnyoutubedislike/ReturnYouTubeDislikePatch.kt | 6 +++++- .../patches/youtube/layout/searchbar/WideSearchbarPatch.kt | 6 +++++- .../layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt | 6 +++++- .../layout/sponsorblock/SponsorBlockBytecodePatch.kt | 6 +++++- .../youtube/layout/spoofappversion/SpoofAppVersionPatch.kt | 6 +++++- .../DisableResumingShortsOnStartupPatch.kt | 6 +++++- .../layout/tabletminiplayer/TabletMiniPlayerPatch.kt | 6 +++++- .../patches/youtube/layout/theme/ThemeBytecodePatch.kt | 6 +++++- .../youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt | 6 +++++- .../patches/youtube/misc/autorepeat/AutoRepeatPatch.kt | 6 +++++- .../misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt | 6 +++++- .../patches/youtube/misc/gms/GmsCoreSupportPatch.kt | 4 ++++ .../patches/youtube/misc/links/BypassURLRedirectsPatch.kt | 6 +++++- .../patches/youtube/misc/links/OpenLinksExternallyPatch.kt | 6 +++++- .../misc/minimizedplayback/MinimizedPlaybackPatch.kt | 6 +++++- .../misc/privacy/RemoveTrackingQueryParameterPatch.kt | 6 +++++- .../youtube/video/quality/RememberVideoQualityPatch.kt | 6 +++++- .../patches/youtube/video/speed/PlaybackSpeedPatch.kt | 6 +++++- .../videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt | 6 +++++- 54 files changed, 267 insertions(+), 51 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt index 063f033ec6..eb1537c2dc 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt @@ -42,7 +42,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt index a90956e0f1..94d5360a8a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt @@ -36,7 +36,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt index 06e496e0ea..5eb0ae7935 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt @@ -41,7 +41,11 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt index 89398b8d2e..6c994e46f8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt @@ -29,7 +29,11 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt index 7fdacaeffc..49aa6afae2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt @@ -38,7 +38,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt index 6147a3d546..8e1ed6d6a3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt @@ -35,7 +35,11 @@ import app.revanced.util.resultOrThrow "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt index e18a8f0763..630683556a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt @@ -38,7 +38,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt index 3c4be5ad05..882ed47047 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt @@ -40,7 +40,11 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt index eb5ef93cdc..b8ce9e005b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt @@ -36,7 +36,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt index 5e21c60747..6e93823a75 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt @@ -42,7 +42,11 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt index 00f15cab35..f283478c47 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt @@ -40,7 +40,11 @@ import app.revanced.util.exception "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt index 2a6284827f..ded51a7e33 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt @@ -39,7 +39,11 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt index 037609b3c3..1e1458684d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt @@ -49,7 +49,11 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt index 88e8566865..b1cfe13f4f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt @@ -40,7 +40,11 @@ import com.android.tools.smali.dexlib2.Opcode "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt index c660344deb..21b557ef1d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt @@ -48,6 +48,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.07.40", "19.08.36", "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt index b51f3270e3..6ca7b957e5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt @@ -44,7 +44,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction3rc "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt index b11b244356..394653a38c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt @@ -38,7 +38,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt index 34e2232bbe..55fd822852 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt @@ -38,7 +38,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt index 9cdb9c9b96..8e17992ad3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt @@ -38,7 +38,11 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt index b429d69a69..a4b56dd162 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt @@ -38,7 +38,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt index aecd7cf12a..e29d008547 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt @@ -41,7 +41,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt index 0a836aa5a0..c5bacd2878 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt @@ -38,7 +38,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt index 1b4606c4ed..84c3832357 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt @@ -34,7 +34,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt index 0a4ea85b02..56c3933bdf 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt @@ -34,7 +34,11 @@ import app.revanced.util.exception "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt index 5a7428d7ed..1fc12a7194 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt @@ -60,6 +60,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.07.40", "19.08.36", "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt index 7cb8d8658f..833fabdb68 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt @@ -45,7 +45,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt index 91948d7f26..b7bd1a40f7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt @@ -34,7 +34,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt index 904de9c056..913e391b27 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt @@ -39,7 +39,11 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt index 5758d813fa..f934e1a5fd 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt @@ -36,7 +36,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt index 8e8434af95..e5b6a8960e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt @@ -41,7 +41,11 @@ import app.revanced.patches.youtube.shared.fingerprints.SeekbarOnDrawFingerprint "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt index e43a598e9b..19eec1f57c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt @@ -51,7 +51,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt index c939e786de..31d4537028 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt @@ -33,7 +33,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt index a3c731ef1c..764797a360 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt @@ -34,7 +34,11 @@ import app.revanced.util.exception "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt index 58fade4e04..7e50ead3b7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt @@ -35,7 +35,11 @@ import app.revanced.util.exception "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt index d5e1893a2d..2728866039 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt @@ -30,7 +30,11 @@ import org.w3c.dom.Element "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt index 783474eb39..93ac6b3901 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt @@ -64,7 +64,11 @@ import com.android.tools.smali.dexlib2.iface.reference.TypeReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt index 3cd258b786..259c1c2785 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt @@ -39,7 +39,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt index 77de2e7525..eeaf74284b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt @@ -35,7 +35,11 @@ import app.revanced.util.exception "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt index 52ab535e8e..fa06e28239 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt @@ -48,7 +48,11 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt index b4a64d790a..21952a6c8a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt @@ -38,7 +38,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt index 7ed2878169..e29c3fbf1c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt @@ -44,7 +44,11 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt index b770c77437..2664312e15 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt @@ -43,7 +43,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ) ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt index ac69564d25..98965b5f2c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt @@ -47,7 +47,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt index 2f624435b1..89a120911f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt @@ -63,7 +63,11 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt index 55c1109668..9087597445 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt @@ -39,7 +39,11 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt index 123bbd356d..4531a5fa04 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt @@ -34,7 +34,11 @@ import app.revanced.util.exception "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt index 6547f0ec32..3240b70aa4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt @@ -45,6 +45,10 @@ object GmsCoreSupportPatch : BaseGmsCoreSupportPatch( "19.07.40", "19.08.36", "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ), ), ), diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt index 3228a7c681..34de895ab3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt @@ -36,7 +36,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt index 682868644c..aafc493f0e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt @@ -40,7 +40,11 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt index 4374262a3e..c083139c22 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt @@ -45,7 +45,11 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt index 28404a8f4d..3dc186c4d7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt @@ -41,7 +41,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt index 858d30b142..124b29d9b2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt @@ -45,7 +45,11 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt index f8e9330a51..d0efc3a414 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt @@ -25,7 +25,11 @@ import app.revanced.patches.youtube.video.speed.remember.RememberPlaybackSpeedPa "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt index 25b01b1ab5..2716e73a5f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt @@ -41,7 +41,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37" + "19.09.37", + "19.09.38", + "19.10.39", + "19.11.43", + "19.12.41" ] ) ] From 95f07f471d14fe312091a7020ac0b253c265b547 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 1 Apr 2024 19:19:24 +0400 Subject: [PATCH 3/9] remove `19.12` --- .../app/revanced/patches/youtube/ad/general/HideAdsPatch.kt | 3 +-- .../patches/youtube/ad/getpremium/HideGetPremiumPatch.kt | 3 +-- .../app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt | 3 +-- .../interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt | 3 +-- .../interaction/dialog/RemoveViewerDiscretionDialogPatch.kt | 3 +-- .../patches/youtube/interaction/downloads/DownloadsPatch.kt | 3 +-- .../interaction/seekbar/DisablePreciseSeekingGesturePatch.kt | 3 +-- .../youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt | 3 +-- .../youtube/interaction/seekbar/EnableSlideToSeekPatch.kt | 3 +-- .../interaction/swipecontrols/SwipeControlsBytecodePatch.kt | 3 +-- .../patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt | 3 +-- .../patches/youtube/layout/buttons/action/HideButtonsPatch.kt | 3 +-- .../youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt | 3 +-- .../youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt | 3 +-- .../layout/buttons/navigation/NavigationButtonsPatch.kt | 3 +-- .../layout/buttons/player/hide/HidePlayerButtonsPatch.kt | 3 +-- .../patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt | 3 +-- .../youtube/layout/hide/breakingnews/BreakingNewsPatch.kt | 3 +-- .../patches/youtube/layout/hide/comments/CommentsPatch.kt | 3 +-- .../layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt | 3 +-- .../layout/hide/endscreencards/HideEndscreenCardsPatch.kt | 3 +-- .../youtube/layout/hide/filterbar/HideFilterBarPatch.kt | 3 +-- .../floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt | 3 +-- .../fullscreenambientmode/DisableFullscreenAmbientModePatch.kt | 3 +-- .../youtube/layout/hide/general/HideLayoutComponentsPatch.kt | 3 +-- .../youtube/layout/hide/infocards/HideInfoCardsPatch.kt | 3 +-- .../layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt | 3 +-- .../hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt | 3 +-- .../hide/rollingnumber/DisableRollingNumberAnimationPatch.kt | 3 +-- .../patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt | 3 +-- .../youtube/layout/hide/shorts/HideShortsComponentsPatch.kt | 3 +-- .../DisableSuggestedVideoEndScreenPatch.kt | 3 +-- .../patches/youtube/layout/hide/time/HideTimestampPatch.kt | 3 +-- .../youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt | 3 +-- .../layout/player/background/PlayerControlsBackgroundPatch.kt | 3 +-- .../layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt | 3 +-- .../patches/youtube/layout/searchbar/WideSearchbarPatch.kt | 3 +-- .../youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt | 3 +-- .../youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt | 3 +-- .../youtube/layout/spoofappversion/SpoofAppVersionPatch.kt | 3 +-- .../startupshortsreset/DisableResumingShortsOnStartupPatch.kt | 3 +-- .../youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt | 3 +-- .../patches/youtube/layout/theme/ThemeBytecodePatch.kt | 3 +-- .../youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt | 3 +-- .../patches/youtube/misc/autorepeat/AutoRepeatPatch.kt | 3 +-- .../misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt | 3 +-- .../revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt | 3 +-- .../patches/youtube/misc/links/BypassURLRedirectsPatch.kt | 3 +-- .../patches/youtube/misc/links/OpenLinksExternallyPatch.kt | 3 +-- .../youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt | 3 +-- .../youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt | 3 +-- .../patches/youtube/video/quality/RememberVideoQualityPatch.kt | 3 +-- .../revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt | 3 +-- .../video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt | 3 +-- 54 files changed, 54 insertions(+), 108 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt index eb1537c2dc..fe318c6d49 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt @@ -45,8 +45,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt index 94d5360a8a..eec31c4c40 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt @@ -39,8 +39,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt index 5eb0ae7935..736c5b8493 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt @@ -44,8 +44,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt index 6c994e46f8..6a871408d3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt @@ -32,8 +32,7 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt index 49aa6afae2..be95bcbd7a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt @@ -41,8 +41,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt index 8e1ed6d6a3..6c863256cf 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt @@ -38,8 +38,7 @@ import app.revanced.util.resultOrThrow "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt index 630683556a..e567725615 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt @@ -41,8 +41,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt index 882ed47047..88b651efd5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt @@ -43,8 +43,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt index b8ce9e005b..f96f3d8781 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt @@ -39,8 +39,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt index 6e93823a75..d7fb403849 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt @@ -45,8 +45,7 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt index f283478c47..3ed26cf165 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt @@ -43,8 +43,7 @@ import app.revanced.util.exception "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt index ded51a7e33..1401869d60 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt @@ -42,8 +42,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt index 1e1458684d..7752ce6006 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt @@ -52,8 +52,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt index b1cfe13f4f..cd6201bb22 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt @@ -43,8 +43,7 @@ import com.android.tools.smali.dexlib2.Opcode "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt index 21b557ef1d..3ce300d900 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt @@ -50,8 +50,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt index 6ca7b957e5..3c13708c39 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt @@ -47,8 +47,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction3rc "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt index 394653a38c..ac28d887ce 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt @@ -41,8 +41,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt index 55fd822852..d26b2e1ff0 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt @@ -41,8 +41,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt index 8e17992ad3..d8ba2a6190 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt @@ -41,8 +41,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt index a4b56dd162..30b51fd50d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt @@ -41,8 +41,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt index e29d008547..5ee8ea0904 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt @@ -44,8 +44,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt index c5bacd2878..f90cecb184 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt @@ -41,8 +41,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt index 84c3832357..9cd829f755 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt @@ -37,8 +37,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt index 56c3933bdf..65d703dc13 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt @@ -37,8 +37,7 @@ import app.revanced.util.exception "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt index 1fc12a7194..a3f873f332 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt @@ -62,8 +62,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt index 833fabdb68..4867b92dbb 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt @@ -48,8 +48,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt index b7bd1a40f7..3fefd4cee3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt @@ -37,8 +37,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt index 913e391b27..c02489e282 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt @@ -42,8 +42,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt index f934e1a5fd..bd666945c6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt @@ -39,8 +39,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt index e5b6a8960e..6f4620f3d5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt @@ -44,8 +44,7 @@ import app.revanced.patches.youtube.shared.fingerprints.SeekbarOnDrawFingerprint "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt index 19eec1f57c..0524748e5c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt @@ -54,8 +54,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt index 31d4537028..76176af5c3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt @@ -36,8 +36,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt index 764797a360..bbd2d09c38 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt @@ -37,8 +37,7 @@ import app.revanced.util.exception "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt index 7e50ead3b7..8426ff578b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt @@ -38,8 +38,7 @@ import app.revanced.util.exception "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt index 2728866039..8e1cecf930 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt @@ -33,8 +33,7 @@ import org.w3c.dom.Element "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt index 93ac6b3901..f958a747ba 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt @@ -67,8 +67,7 @@ import com.android.tools.smali.dexlib2.iface.reference.TypeReference "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt index 259c1c2785..1d6605198d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt @@ -42,8 +42,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt index eeaf74284b..a580173024 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt @@ -38,8 +38,7 @@ import app.revanced.util.exception "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt index fa06e28239..d20e885219 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt @@ -51,8 +51,7 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt index 21952a6c8a..6da4d6468d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt @@ -41,8 +41,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt index e29c3fbf1c..709b365e07 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt @@ -47,8 +47,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt index 2664312e15..186f234917 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt @@ -46,8 +46,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ) ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt index 98965b5f2c..0799fdf03b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt @@ -50,8 +50,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt index 89a120911f..e474406e18 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt @@ -66,8 +66,7 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt index 9087597445..4915dc5828 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt @@ -42,8 +42,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt index 4531a5fa04..9ff7aec4db 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt @@ -37,8 +37,7 @@ import app.revanced.util.exception "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt index 3240b70aa4..e10ec4dd94 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt @@ -47,8 +47,7 @@ object GmsCoreSupportPatch : BaseGmsCoreSupportPatch( "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ), ), ), diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt index 34de895ab3..40b0ddbdf1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt @@ -39,8 +39,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt index aafc493f0e..b4b9c09132 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt @@ -43,8 +43,7 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt index c083139c22..ff1b44e490 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt @@ -48,8 +48,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt index 3dc186c4d7..0c2406a93a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt @@ -44,8 +44,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt index 124b29d9b2..3f6de2aee7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt @@ -48,8 +48,7 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt index d0efc3a414..6c4b18c06c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt @@ -28,8 +28,7 @@ import app.revanced.patches.youtube.video.speed.remember.RememberPlaybackSpeedPa "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt index 2716e73a5f..e4d5f29de5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt @@ -44,8 +44,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.09.37", "19.09.38", "19.10.39", - "19.11.43", - "19.12.41" + "19.11.43" ] ) ] From 90766dc365de4760191283121f8807c2c610589b Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 1 Apr 2024 19:22:03 +0400 Subject: [PATCH 4/9] Comments --- .../interaction/swipecontrols/SwipeControlsBytecodePatch.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt index d7fb403849..aa647386b5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt @@ -45,7 +45,10 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod "19.09.37", "19.09.38", "19.10.39", - "19.11.43" + "19.11.43" // 19.12.x has an issue with opening YT using external links, + // and the app then crashes if double tap to skip forward/back is immediately used. + // The stack trace shows a call coming from integrations SwipeController, + // but it appears to be a bug in YT itself as other target versions do not have this issue. ] ) ] From 5c528ad151cadea9d7554130b286316386b00939 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 2 Apr 2024 23:09:07 +0400 Subject: [PATCH 5/9] fix: For now, only support 19.09.38 --- .../app/revanced/patches/youtube/ad/general/HideAdsPatch.kt | 4 +--- .../patches/youtube/ad/getpremium/HideGetPremiumPatch.kt | 4 +--- .../app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt | 4 +--- .../interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt | 4 +--- .../interaction/dialog/RemoveViewerDiscretionDialogPatch.kt | 4 +--- .../patches/youtube/interaction/downloads/DownloadsPatch.kt | 4 +--- .../interaction/seekbar/DisablePreciseSeekingGesturePatch.kt | 4 +--- .../youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt | 4 +--- .../youtube/interaction/seekbar/EnableSlideToSeekPatch.kt | 4 +--- .../interaction/swipecontrols/SwipeControlsBytecodePatch.kt | 5 ++--- .../patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt | 4 +--- .../youtube/layout/buttons/action/HideButtonsPatch.kt | 4 +--- .../layout/buttons/autoplay/HideAutoplayButtonPatch.kt | 4 +--- .../layout/buttons/captions/HideCaptionsButtonPatch.kt | 4 +--- .../layout/buttons/navigation/NavigationButtonsPatch.kt | 4 +--- .../layout/buttons/player/hide/HidePlayerButtonsPatch.kt | 4 +--- .../youtube/layout/hide/albumcards/AlbumCardsPatch.kt | 4 +--- .../youtube/layout/hide/breakingnews/BreakingNewsPatch.kt | 4 +--- .../patches/youtube/layout/hide/comments/CommentsPatch.kt | 4 +--- .../layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt | 4 +--- .../layout/hide/endscreencards/HideEndscreenCardsPatch.kt | 4 +--- .../youtube/layout/hide/filterbar/HideFilterBarPatch.kt | 4 +--- .../floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt | 4 +--- .../DisableFullscreenAmbientModePatch.kt | 4 +--- .../youtube/layout/hide/general/HideLayoutComponentsPatch.kt | 4 +--- .../youtube/layout/hide/infocards/HideInfoCardsPatch.kt | 4 +--- .../layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt | 4 +--- .../hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt | 4 +--- .../hide/rollingnumber/DisableRollingNumberAnimationPatch.kt | 4 +--- .../patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt | 4 +--- .../youtube/layout/hide/shorts/HideShortsComponentsPatch.kt | 5 +---- .../DisableSuggestedVideoEndScreenPatch.kt | 4 +--- .../patches/youtube/layout/hide/time/HideTimestampPatch.kt | 4 +--- .../youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt | 4 +--- .../player/background/PlayerControlsBackgroundPatch.kt | 4 +--- .../layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt | 4 +--- .../patches/youtube/layout/searchbar/WideSearchbarPatch.kt | 4 +--- .../layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt | 4 +--- .../youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt | 4 +--- .../youtube/layout/spoofappversion/SpoofAppVersionPatch.kt | 4 +--- .../DisableResumingShortsOnStartupPatch.kt | 4 +--- .../youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt | 4 +--- .../patches/youtube/layout/theme/ThemeBytecodePatch.kt | 4 +--- .../youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt | 4 +--- .../patches/youtube/misc/autorepeat/AutoRepeatPatch.kt | 4 +--- .../misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt | 4 +--- .../revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt | 4 +--- .../patches/youtube/misc/links/BypassURLRedirectsPatch.kt | 4 +--- .../patches/youtube/misc/links/OpenLinksExternallyPatch.kt | 4 +--- .../youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt | 4 +--- .../misc/privacy/RemoveTrackingQueryParameterPatch.kt | 4 +--- .../youtube/video/quality/RememberVideoQualityPatch.kt | 4 +--- .../patches/youtube/video/speed/PlaybackSpeedPatch.kt | 4 +--- .../videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt | 4 +--- 54 files changed, 55 insertions(+), 163 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt index fe318c6d49..733187e361 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt @@ -43,9 +43,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt index eec31c4c40..6deece757e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt @@ -37,9 +37,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt index 736c5b8493..57a6586a78 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt @@ -42,9 +42,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt index 6a871408d3..5c69ab961c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt @@ -30,9 +30,7 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt index be95bcbd7a..3eebe784b6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt @@ -39,9 +39,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt index 6c863256cf..2f04b3cb56 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt @@ -36,9 +36,7 @@ import app.revanced.util.resultOrThrow "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt index e567725615..e34892f5b9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt @@ -39,9 +39,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt index 88b651efd5..6f0cbbd6f8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt @@ -41,9 +41,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt index f96f3d8781..bba12ef9f7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt @@ -37,9 +37,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt index aa647386b5..02b3bc9160 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt @@ -43,9 +43,8 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" // 19.12.x has an issue with opening YT using external links, + "19.09.38" + // 19.12.x has an issue with opening YT using external links, // and the app then crashes if double tap to skip forward/back is immediately used. // The stack trace shows a call coming from integrations SwipeController, // but it appears to be a bug in YT itself as other target versions do not have this issue. diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt index 3ed26cf165..3c18c178f5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt @@ -41,9 +41,7 @@ import app.revanced.util.exception "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt index 1401869d60..00466c44db 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt @@ -40,9 +40,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt index 7752ce6006..264538bd2a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt @@ -50,9 +50,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt index cd6201bb22..c28be25260 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt @@ -41,9 +41,7 @@ import com.android.tools.smali.dexlib2.Opcode "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt index 3ce300d900..97ee63cf4a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt @@ -48,9 +48,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt index 3c13708c39..c31494834a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt @@ -45,9 +45,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction3rc "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt index ac28d887ce..7f16535432 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt @@ -39,9 +39,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt index d26b2e1ff0..b96ed1fe80 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt @@ -39,9 +39,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt index d8ba2a6190..558ce4aad1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt @@ -39,9 +39,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt index 30b51fd50d..4afea684e7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt @@ -39,9 +39,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt index 5ee8ea0904..a635a11bdb 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt @@ -42,9 +42,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt index f90cecb184..c896c03574 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt @@ -39,9 +39,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt index 9cd829f755..708234f7a4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt @@ -35,9 +35,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt index 65d703dc13..46c1f018aa 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt @@ -35,9 +35,7 @@ import app.revanced.util.exception "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt index a3f873f332..dcbf48e55c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt @@ -60,9 +60,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt index 4867b92dbb..5b80417c14 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt @@ -46,9 +46,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt index 3fefd4cee3..bee7172cc2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt @@ -35,9 +35,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt index c02489e282..b9dee32043 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt @@ -40,9 +40,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt index bd666945c6..f2d9263cf5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt @@ -37,9 +37,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt index 6f4620f3d5..406a9fb840 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt @@ -42,9 +42,7 @@ import app.revanced.patches.youtube.shared.fingerprints.SeekbarOnDrawFingerprint "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt index 0524748e5c..e1d40716fb 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt @@ -1,7 +1,6 @@ package app.revanced.patches.youtube.layout.hide.shorts import app.revanced.util.exception -import app.revanced.util.findIndexForIdResource import app.revanced.util.injectHideViewCall import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction @@ -52,9 +51,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt index 76176af5c3..75589221aa 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt @@ -34,9 +34,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt index bbd2d09c38..64aaad710e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt @@ -35,9 +35,7 @@ import app.revanced.util.exception "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt index 8426ff578b..70c50e4604 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt @@ -36,9 +36,7 @@ import app.revanced.util.exception "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt index 8e1cecf930..fba37a0cbd 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt @@ -31,9 +31,7 @@ import org.w3c.dom.Element "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt index f958a747ba..bc63f64b2c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt @@ -65,9 +65,7 @@ import com.android.tools.smali.dexlib2.iface.reference.TypeReference "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt index 1d6605198d..f7dd580bf2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt @@ -40,9 +40,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt index a580173024..4edf19bd17 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt @@ -36,9 +36,7 @@ import app.revanced.util.exception "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt index d20e885219..ca51ee88c2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt @@ -49,9 +49,7 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt index 6da4d6468d..91eab4a9da 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt @@ -39,9 +39,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt index 709b365e07..86e5c7a49b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt @@ -45,9 +45,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt index 186f234917..7631fb7c81 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt @@ -44,9 +44,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ) ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt index 0799fdf03b..7a0b66b74d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt @@ -48,9 +48,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt index e474406e18..8d2c33b244 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt @@ -64,9 +64,7 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt index 4915dc5828..eadbd88701 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt @@ -40,9 +40,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt index 9ff7aec4db..a76f116160 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt @@ -35,9 +35,7 @@ import app.revanced.util.exception "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt index e10ec4dd94..c8f3853eca 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt @@ -45,9 +45,7 @@ object GmsCoreSupportPatch : BaseGmsCoreSupportPatch( "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ), ), ), diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt index 40b0ddbdf1..fadaf141c6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt @@ -37,9 +37,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt index b4b9c09132..9da810c641 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt @@ -41,9 +41,7 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt index ff1b44e490..f032d67267 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt @@ -46,9 +46,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt index 0c2406a93a..388e24eaee 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt @@ -42,9 +42,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt index 3f6de2aee7..c65fca4b89 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt @@ -46,9 +46,7 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt index 6c4b18c06c..cec26e5d5c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt @@ -26,9 +26,7 @@ import app.revanced.patches.youtube.video.speed.remember.RememberPlaybackSpeedPa "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt index e4d5f29de5..7f888dde0a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt @@ -42,9 +42,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.07.40", "19.08.36", "19.09.37", - "19.09.38", - "19.10.39", - "19.11.43" + "19.09.38" ] ) ] From c8206b5da1715ce4f93d3612d83b024bf22fd739 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Wed, 17 Apr 2024 20:06:03 +0400 Subject: [PATCH 6/9] fix: Add back support for 19.10 and 19.11 --- .idea/misc.xml | 2 +- .../app/revanced/patches/youtube/ad/general/HideAdsPatch.kt | 5 +++-- .../patches/youtube/ad/getpremium/HideGetPremiumPatch.kt | 5 +++-- .../app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt | 5 +++-- .../interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt | 5 +++-- .../interaction/dialog/RemoveViewerDiscretionDialogPatch.kt | 5 +++-- .../patches/youtube/interaction/downloads/DownloadsPatch.kt | 5 +++-- .../seekbar/DisablePreciseSeekingGesturePatch.kt | 5 +++-- .../interaction/seekbar/EnableSeekbarTappingPatch.kt | 5 +++-- .../youtube/interaction/seekbar/EnableSlideToSeekPatch.kt | 5 +++-- .../interaction/swipecontrols/SwipeControlsBytecodePatch.kt | 6 +++--- .../youtube/layout/autocaptions/AutoCaptionsPatch.kt | 5 +++-- .../youtube/layout/buttons/action/HideButtonsPatch.kt | 5 +++-- .../layout/buttons/autoplay/HideAutoplayButtonPatch.kt | 5 +++-- .../layout/buttons/captions/HideCaptionsButtonPatch.kt | 5 +++-- .../layout/buttons/navigation/NavigationButtonsPatch.kt | 5 +++-- .../layout/buttons/player/hide/HidePlayerButtonsPatch.kt | 5 +++-- .../youtube/layout/hide/albumcards/AlbumCardsPatch.kt | 5 +++-- .../youtube/layout/hide/breakingnews/BreakingNewsPatch.kt | 5 +++-- .../patches/youtube/layout/hide/comments/CommentsPatch.kt | 5 +++-- .../layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt | 5 +++-- .../layout/hide/endscreencards/HideEndscreenCardsPatch.kt | 5 +++-- .../youtube/layout/hide/filterbar/HideFilterBarPatch.kt | 5 +++-- .../floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt | 5 +++-- .../DisableFullscreenAmbientModePatch.kt | 5 +++-- .../layout/hide/general/HideLayoutComponentsPatch.kt | 5 +++-- .../youtube/layout/hide/infocards/HideInfoCardsPatch.kt | 5 +++-- .../layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt | 5 +++-- .../player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt | 5 +++-- .../rollingnumber/DisableRollingNumberAnimationPatch.kt | 5 +++-- .../patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt | 5 +++-- .../youtube/layout/hide/shorts/HideShortsComponentsPatch.kt | 5 +++-- .../DisableSuggestedVideoEndScreenPatch.kt | 5 +++-- .../patches/youtube/layout/hide/time/HideTimestampPatch.kt | 5 +++-- .../youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt | 5 +++-- .../player/background/PlayerControlsBackgroundPatch.kt | 5 +++-- .../returnyoutubedislike/ReturnYouTubeDislikePatch.kt | 5 +++-- .../patches/youtube/layout/searchbar/WideSearchbarPatch.kt | 5 +++-- .../layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt | 5 +++-- .../layout/sponsorblock/SponsorBlockBytecodePatch.kt | 5 +++-- .../youtube/layout/spoofappversion/SpoofAppVersionPatch.kt | 5 +++-- .../DisableResumingShortsOnStartupPatch.kt | 5 +++-- .../layout/tabletminiplayer/TabletMiniPlayerPatch.kt | 5 +++-- .../patches/youtube/layout/theme/ThemeBytecodePatch.kt | 5 +++-- .../youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt | 5 +++-- .../patches/youtube/misc/autorepeat/AutoRepeatPatch.kt | 5 +++-- .../misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt | 5 +++-- .../patches/youtube/misc/gms/GmsCoreSupportPatch.kt | 5 +++-- .../patches/youtube/misc/links/BypassURLRedirectsPatch.kt | 5 +++-- .../patches/youtube/misc/links/OpenLinksExternallyPatch.kt | 5 +++-- .../misc/minimizedplayback/MinimizedPlaybackPatch.kt | 5 +++-- .../misc/privacy/RemoveTrackingQueryParameterPatch.kt | 5 +++-- .../youtube/video/quality/RememberVideoQualityPatch.kt | 5 +++-- .../patches/youtube/video/speed/PlaybackSpeedPatch.kt | 5 +++-- .../videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt | 5 +++-- 55 files changed, 163 insertions(+), 110 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index e086a70c4e..f1854e4b53 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -4,5 +4,5 @@ - + \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt index 733187e361..99d73e4cdf 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt @@ -42,8 +42,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt index 6deece757e..b3094ea2c7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt @@ -36,8 +36,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt index 57a6586a78..c000e08985 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt @@ -41,8 +41,9 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt index 5c69ab961c..87d91821cf 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt @@ -29,8 +29,9 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt index 3eebe784b6..a5de50f0b1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt @@ -38,8 +38,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt index 2f04b3cb56..10e1de2de1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt @@ -35,8 +35,9 @@ import app.revanced.util.resultOrThrow "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt index e34892f5b9..d3df068c21 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt @@ -38,8 +38,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt index 6f0cbbd6f8..c428b24975 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt @@ -40,8 +40,9 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt index bba12ef9f7..a4c7de09ef 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt @@ -36,8 +36,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt index 02b3bc9160..c4e702ac13 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt @@ -42,9 +42,9 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" - // 19.12.x has an issue with opening YT using external links, + "19.09.38", + "19.10.39", + "19.11.43" // 19.12.x has an issue with opening YT using external links, // and the app then crashes if double tap to skip forward/back is immediately used. // The stack trace shows a call coming from integrations SwipeController, // but it appears to be a bug in YT itself as other target versions do not have this issue. diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt index 3c18c178f5..188fa14b05 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt @@ -40,8 +40,9 @@ import app.revanced.util.exception "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt index 00466c44db..deaebe49ce 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt @@ -39,8 +39,9 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt index 264538bd2a..0395b70f03 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt @@ -49,8 +49,9 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt index c28be25260..7ee8e1f3cf 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt @@ -40,8 +40,9 @@ import com.android.tools.smali.dexlib2.Opcode "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt index 97ee63cf4a..1cdbe20d10 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt @@ -47,8 +47,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt index c31494834a..4417091137 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt @@ -44,8 +44,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction3rc "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt index 7f16535432..3877397a4e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt @@ -38,8 +38,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt index b96ed1fe80..aa75303909 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt @@ -38,8 +38,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt index 558ce4aad1..856b48037a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt @@ -38,8 +38,9 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt index 4afea684e7..fa0f459348 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt @@ -38,8 +38,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt index a635a11bdb..02145fa5fb 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt @@ -41,8 +41,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt index c896c03574..f63a78bf03 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt @@ -38,8 +38,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt index 708234f7a4..2ddda6f79a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt @@ -34,8 +34,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt index 46c1f018aa..dcefb0d1a2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt @@ -34,8 +34,9 @@ import app.revanced.util.exception "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt index dcbf48e55c..84011bbb4a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt @@ -59,8 +59,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt index 5b80417c14..cc8e17933a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt @@ -45,8 +45,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt index bee7172cc2..d8f477cac4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt @@ -34,8 +34,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt index b9dee32043..849c52e5f4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt @@ -39,8 +39,9 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt index f2d9263cf5..8ee810b970 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt @@ -36,8 +36,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt index 406a9fb840..485ec1044b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt @@ -41,8 +41,9 @@ import app.revanced.patches.youtube.shared.fingerprints.SeekbarOnDrawFingerprint "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt index e1d40716fb..8941d8c495 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt @@ -50,8 +50,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt index 75589221aa..68407dc686 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt @@ -33,8 +33,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt index 64aaad710e..cb741ddf10 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt @@ -34,8 +34,9 @@ import app.revanced.util.exception "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt index 70c50e4604..a50d781a33 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt @@ -35,8 +35,9 @@ import app.revanced.util.exception "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt index fba37a0cbd..aa9f4b9f1f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt @@ -30,8 +30,9 @@ import org.w3c.dom.Element "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt index bc63f64b2c..6a2a035221 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt @@ -64,8 +64,9 @@ import com.android.tools.smali.dexlib2.iface.reference.TypeReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt index f7dd580bf2..0e72bddaf4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt @@ -39,8 +39,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt index 4edf19bd17..c621a95dd3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/RestoreOldSeekbarThumbnailsPatch.kt @@ -35,8 +35,9 @@ import app.revanced.util.exception "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt index ca51ee88c2..207fa7fb3c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt @@ -48,8 +48,9 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt index 91eab4a9da..82557e6a09 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt @@ -38,8 +38,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt index 86e5c7a49b..57a4d16320 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt @@ -44,8 +44,9 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt index 7631fb7c81..80297fe36a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt @@ -43,8 +43,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ) ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt index 7a0b66b74d..f1faac8308 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemeBytecodePatch.kt @@ -47,8 +47,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt index 8d2c33b244..ae47008a9e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt @@ -63,8 +63,9 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt index eadbd88701..b8c0157f9f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt @@ -39,8 +39,9 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt index a76f116160..1b3c258f4c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt @@ -34,8 +34,9 @@ import app.revanced.util.exception "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt index c8f3853eca..4c9e526ec0 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt @@ -44,8 +44,9 @@ object GmsCoreSupportPatch : BaseGmsCoreSupportPatch( "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ), ), ), diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt index fadaf141c6..cafaa942b0 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt @@ -36,8 +36,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt index 9da810c641..a9cf1bf8ce 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt @@ -40,8 +40,9 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt index f032d67267..b54cc4f40c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt @@ -45,8 +45,9 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt index 388e24eaee..f1af3d569f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt @@ -41,8 +41,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt index c65fca4b89..62249f8480 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt @@ -45,8 +45,9 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt index cec26e5d5c..671dff006f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt @@ -25,8 +25,9 @@ import app.revanced.patches.youtube.video.speed.remember.RememberPlaybackSpeedPa "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ], ), ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt index 7f888dde0a..a2ccd3e942 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuPatch.kt @@ -41,8 +41,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "19.06.39", "19.07.40", "19.08.36", - "19.09.37", - "19.09.38" + "19.09.38", + "19.10.39", + "19.11.43" ] ) ] From a8f42a0ee8e3b34445c53c9e57605717c0259830 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Fri, 19 Apr 2024 14:49:04 +0400 Subject: [PATCH 7/9] fix: Revert change not for this branch --- .idea/misc.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index f1854e4b53..e086a70c4e 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -4,5 +4,5 @@ - + \ No newline at end of file From 49a6e71491b8984428de0b766e88a784eff6bbb6 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Fri, 19 Apr 2024 15:18:14 +0400 Subject: [PATCH 8/9] refactor: Less copy paste of code. Add a description to exception if the resource is not found --- api/revanced-patches.api | 1 + .../misc/mapping/ResourceMappingPatch.kt | 12 +++++++++++ .../navbar/PremiumNavbarTabResourcePatch.kt | 11 +++++----- .../ad/general/HideAdsResourcePatch.kt | 2 +- .../albumcards/AlbumCardsResourcePatch.kt | 7 ++++--- .../CrowdfundingBoxResourcePatch.kt | 7 ++++--- .../HideEndscreenCardsResourcePatch.kt | 7 ++++--- .../filterbar/HideFilterBarResourcePatch.kt | 8 +++----- ...deFloatingMicrophoneButtonResourcePatch.kt | 4 +--- .../HideLayoutComponentsResourcePatch.kt | 8 ++++---- .../infocards/HideInfocardsResourcePatch.kt | 7 ++++--- .../HideShortsComponentsResourcePatch.kt | 8 +++++--- ...bleSuggestedVideoEndScreenResourcePatch.kt | 7 ++++--- ...CustomPlayerOverlayOpacityResourcePatch.kt | 7 ++++--- .../ReturnYouTubeDislikeResourcePatch.kt | 7 ++++--- .../seekbar/SeekbarColorResourcePatch.kt | 20 +++++++++++-------- .../sponsorblock/SponsorBlockBytecodePatch.kt | 4 ++-- .../playback/SpoofSignatureResourcePatch.kt | 7 ++++--- .../NavigationBarHookResourcePatch.kt | 14 +++++++------ .../BottomControlsResourcePatch.kt | 6 ++++-- .../misc/settings/SettingsResourcePatch.kt | 7 ++++--- .../CustomPlaybackSpeedResourcePatch.kt | 7 ++++--- ...RestoreOldVideoQualityMenuResourcePatch.kt | 9 ++++----- .../kotlin/app/revanced/util/BytecodeUtils.kt | 16 ++++++++------- 24 files changed, 111 insertions(+), 82 deletions(-) diff --git a/api/revanced-patches.api b/api/revanced-patches.api index a2e32b9c46..b1d51e2d5e 100644 --- a/api/revanced-patches.api +++ b/api/revanced-patches.api @@ -724,6 +724,7 @@ public final class app/revanced/patches/shared/misc/mapping/ResourceMappingPatch public static final field INSTANCE Lapp/revanced/patches/shared/misc/mapping/ResourceMappingPatch; public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V + public final fun firstIdForResource (Ljava/lang/String;Ljava/lang/String;)J } public final class app/revanced/patches/shared/misc/mapping/ResourceMappingPatch$ResourceElement { diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/mapping/ResourceMappingPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/mapping/ResourceMappingPatch.kt index 23831eb415..b89ce41e74 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/mapping/ResourceMappingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/mapping/ResourceMappingPatch.kt @@ -1,6 +1,7 @@ package app.revanced.patches.shared.misc.mapping import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchException import app.revanced.patcher.patch.ResourcePatch import org.w3c.dom.Element import java.util.* @@ -60,4 +61,15 @@ object ResourceMappingPatch : ResourcePatch() { } data class ResourceElement(val type: String, val name: String, val id: Long) + + /** + * @throws PatchException if the resource is not found. + */ + fun firstIdForResource(type: String, name: String) : Long { + val resource = resourceMappings.find { + it.type == type && it.name == name + } ?: throw PatchException("Could not find resource type: $type with name: $name") + + return resource.id + } } diff --git a/src/main/kotlin/app/revanced/patches/spotify/navbar/PremiumNavbarTabResourcePatch.kt b/src/main/kotlin/app/revanced/patches/spotify/navbar/PremiumNavbarTabResourcePatch.kt index 5f2ac4b22e..aa262f74d8 100644 --- a/src/main/kotlin/app/revanced/patches/spotify/navbar/PremiumNavbarTabResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/spotify/navbar/PremiumNavbarTabResourcePatch.kt @@ -11,12 +11,11 @@ object PremiumNavbarTabResourcePatch : ResourcePatch() { internal var premiumTabId = -1L override fun execute(context: ResourceContext) { - premiumTabId = ResourceMappingPatch.resourceMappings.single { - it.type == "id" && it.name == "premium_tab" - }.id + premiumTabId = ResourceMappingPatch.firstIdForResource("id", "premium_tab") - showBottomNavigationItemsTextId = ResourceMappingPatch.resourceMappings.single { - it.type == "bool" && it.name == "show_bottom_navigation_items_text" - }.id + showBottomNavigationItemsTextId = ResourceMappingPatch.firstIdForResource( + "bool", + "show_bottom_navigation_items_text" + ) } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsResourcePatch.kt index ebf47807e1..5cd938cb43 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsResourcePatch.kt @@ -40,6 +40,6 @@ object HideAdsResourcePatch : ResourcePatch() { LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR) - adAttributionId = ResourceMappingPatch.resourceMappings.single { it.name == "ad_attribution" }.id + adAttributionId = ResourceMappingPatch.firstIdForResource("id", "ad_attribution") } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsResourcePatch.kt index 08b54204fc..0a04623b8a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsResourcePatch.kt @@ -25,8 +25,9 @@ internal object AlbumCardsResourcePatch : ResourcePatch() { SwitchPreference("revanced_hide_album_cards") ) - albumCardId = ResourceMappingPatch.resourceMappings.single { - it.type == "layout" && it.name == "album_card" - }.id + albumCardId = ResourceMappingPatch.firstIdForResource( + "layout", + "album_card" + ) } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxResourcePatch.kt index 4e61c0953b..49bfccd80a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxResourcePatch.kt @@ -25,8 +25,9 @@ internal object CrowdfundingBoxResourcePatch : ResourcePatch() { SwitchPreference("revanced_hide_crowdfunding_box") ) - crowdfundingBoxId = ResourceMappingPatch.resourceMappings.single { - it.type == "layout" && it.name == "donation_companion" - }.id + crowdfundingBoxId = ResourceMappingPatch.firstIdForResource( + "layout", + "donation_companion" + ) } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsResourcePatch.kt index 13231b7bd9..5722a7f41b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsResourcePatch.kt @@ -27,9 +27,10 @@ internal object HideEndscreenCardsResourcePatch : ResourcePatch() { SwitchPreference("revanced_hide_endscreen_cards") ) - fun findEndscreenResourceId(name: String) = ResourceMappingPatch.resourceMappings.single { - it.type == "layout" && it.name == "endscreen_element_layout_$name" - }.id + fun findEndscreenResourceId(name: String) = ResourceMappingPatch.firstIdForResource( + "layout", + "endscreen_element_layout_$name" + ) layoutCircle = findEndscreenResourceId("circle") layoutIcon = findEndscreenResourceId("icon") diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarResourcePatch.kt index a10d22a09d..3d90642aab 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarResourcePatch.kt @@ -29,11 +29,9 @@ internal object HideFilterBarResourcePatch : ResourcePatch() { ) ) - relatedChipCloudMarginId = "related_chip_cloud_reduced_margins".layoutResourceId("layout") - filterBarHeightId = "filter_bar_height".layoutResourceId() - barContainerHeightId = "bar_container_height".layoutResourceId() + relatedChipCloudMarginId = ResourceMappingPatch.firstIdForResource("layout", "related_chip_cloud_reduced_margins") + filterBarHeightId = ResourceMappingPatch.firstIdForResource("dimen", "filter_bar_height") + barContainerHeightId = ResourceMappingPatch.firstIdForResource("dimen", "bar_container_height") } - private fun String.layoutResourceId(type: String = "dimen") = - ResourceMappingPatch.resourceMappings.single { it.type == type && it.name == this }.id } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonResourcePatch.kt index 7dbd6a1549..16a5673369 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonResourcePatch.kt @@ -1,7 +1,6 @@ package app.revanced.patches.youtube.layout.hide.floatingmicrophone import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.patch.PatchException import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotation.Patch import app.revanced.patches.all.misc.resources.AddResourcesPatch @@ -26,7 +25,6 @@ internal object HideFloatingMicrophoneButtonResourcePatch : ResourcePatch() { SwitchPreference("revanced_hide_floating_microphone_button") ) - fabButtonId = ResourceMappingPatch.resourceMappings.find { it.type == "id" && it.name == "fab" }?.id - ?: throw PatchException("Can not find required fab button resource id") + fabButtonId = ResourceMappingPatch.firstIdForResource("id", "fab") } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsResourcePatch.kt index 7b9dce7c5c..778c18ef60 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsResourcePatch.kt @@ -5,7 +5,6 @@ import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotation.Patch import app.revanced.patches.all.misc.resources.AddResourcesPatch import app.revanced.patches.shared.misc.mapping.ResourceMappingPatch -import app.revanced.patches.shared.misc.settings.preference.SwitchPreference import app.revanced.patches.youtube.misc.settings.SettingsPatch @Patch( @@ -19,8 +18,9 @@ internal object HideLayoutComponentsResourcePatch : ResourcePatch() { internal var expandButtonDownId: Long = -1 override fun execute(context: ResourceContext) { - expandButtonDownId = ResourceMappingPatch.resourceMappings.single { - it.type == "layout" && it.name == "expand_button_down" - }.id + expandButtonDownId = ResourceMappingPatch.firstIdForResource( + "layout", + "expand_button_down" + ) } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfocardsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfocardsResourcePatch.kt index 6ac2377faf..0c86724935 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfocardsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfocardsResourcePatch.kt @@ -25,8 +25,9 @@ object HideInfocardsResourcePatch : ResourcePatch() { SwitchPreference("revanced_hide_info_cards") ) - drawerResourceId = ResourceMappingPatch.resourceMappings.single { - it.type == "id" && it.name == "info_cards_drawer_header" - }.id + drawerResourceId = ResourceMappingPatch.firstIdForResource( + "id", + "info_cards_drawer_header" + ) } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt index 883dc71d5f..f93c6c3db2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt @@ -50,14 +50,16 @@ object HideShortsComponentsResourcePatch : ResourcePatch() { SwitchPreference("revanced_hide_shorts_navigation_bar"), ) + // Cannot use first, as this resource does not exist in newer targets. ResourceMappingPatch.resourceMappings.find { it.type == "layout" && it.name == "reel_multiple_items_shelf" }?.also { reelMultipleItemShelfId = it.id } - reelPlayerRightCellButtonHeight = ResourceMappingPatch.resourceMappings.first { - it.type == "dimen" && it.name == "reel_player_right_cell_button_height" - }.id + reelPlayerRightCellButtonHeight = ResourceMappingPatch.firstIdForResource( + "dimen", + "reel_player_right_cell_button_height" + ) } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenResourcePatch.kt index 28122d1a2c..1f7103c43b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenResourcePatch.kt @@ -25,8 +25,9 @@ internal object DisableSuggestedVideoEndScreenResourcePatch : ResourcePatch() { SwitchPreference("revanced_disable_suggested_video_end_screen") ) - sizeAdjustableLiteAutoNavOverlay = ResourceMappingPatch.resourceMappings.single { - it.type == "layout" && it.name == "size_adjustable_lite_autonav_overlay" - }.id + sizeAdjustableLiteAutoNavOverlay = ResourceMappingPatch.firstIdForResource( + "layout", + "size_adjustable_lite_autonav_overlay" + ) } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/CustomPlayerOverlayOpacityResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/CustomPlayerOverlayOpacityResourcePatch.kt index 147ccaccf4..5398d70f43 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/CustomPlayerOverlayOpacityResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/CustomPlayerOverlayOpacityResourcePatch.kt @@ -22,8 +22,9 @@ internal object CustomPlayerOverlayOpacityResourcePatch : ResourcePatch() { TextPreference("revanced_player_overlay_opacity", inputType = InputType.NUMBER) ) - scrimOverlayId = ResourceMappingPatch.resourceMappings.single { - it.type == "id" && it.name == "scrim_overlay" - }.id + scrimOverlayId = ResourceMappingPatch.firstIdForResource( + "id", + "scrim_overlay" + ) } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikeResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikeResourcePatch.kt index 06226fc0cd..af689715a4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikeResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikeResourcePatch.kt @@ -28,8 +28,9 @@ internal object ReturnYouTubeDislikeResourcePatch : ResourcePatch() { intent = SettingsPatch.newIntent("revanced_ryd_settings_intent") ) - oldUIDislikeId = ResourceMappingPatch.resourceMappings.single { - it.type == "id" && it.name == "dislike_button" - }.id + oldUIDislikeId = ResourceMappingPatch.firstIdForResource( + "id", + "dislike_button" + ) } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/SeekbarColorResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/SeekbarColorResourcePatch.kt index 09a686be3a..410d94cb3d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/SeekbarColorResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/SeekbarColorResourcePatch.kt @@ -15,18 +15,22 @@ internal object SeekbarColorResourcePatch : ResourcePatch() { internal var inlineTimeBarPlayedNotHighlightedColorId = -1L override fun execute(context: ResourceContext) { - fun findColorResource(resourceName: String): Long { - return ResourceMappingPatch.resourceMappings - .find { it.type == "color" && it.name == resourceName }?.id - ?: throw PatchException("Could not find color resource: $resourceName") - } reelTimeBarPlayedColorId = - findColorResource("reel_time_bar_played_color") + ResourceMappingPatch.firstIdForResource( + "color", + "reel_time_bar_played_color" + ) inlineTimeBarColorizedBarPlayedColorDarkId = - findColorResource("inline_time_bar_colorized_bar_played_color_dark") + ResourceMappingPatch.firstIdForResource( + "color", + "inline_time_bar_colorized_bar_played_color_dark" + ) inlineTimeBarPlayedNotHighlightedColorId = - findColorResource("inline_time_bar_played_not_highlighted_color") + ResourceMappingPatch.firstIdForResource( + "color", + "inline_time_bar_played_not_highlighted_color" + ) // Edit the resume playback drawable and replace the progress bar with a custom drawable context.xmlEditor["res/drawable/resume_playback_progressbar_drawable.xml"].use { editor -> diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt index 207fa7fb3c..7659b05732 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt @@ -168,9 +168,9 @@ object SponsorBlockBytecodePatch : BytecodePatch( val controlsMethodResult = PlayerControlsBytecodePatch.showPlayerControlsFingerprintResult val controlsLayoutStubResourceId = - ResourceMappingPatch.resourceMappings.single { it.type == "id" && it.name == "controls_layout_stub" }.id + ResourceMappingPatch.firstIdForResource("id", "controls_layout_stub") val zoomOverlayResourceId = - ResourceMappingPatch.resourceMappings.single { it.type == "id" && it.name == "video_zoom_overlay_stub" }.id + ResourceMappingPatch.firstIdForResource("id", "video_zoom_overlay_stub") methods@ for (method in controlsMethodResult.mutableClass.methods) { val instructions = method.implementation?.instructions!! diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofSignatureResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofSignatureResourcePatch.kt index 54bfa75406..ef0f1e2f5e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofSignatureResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofSignatureResourcePatch.kt @@ -11,8 +11,9 @@ object SpoofSignatureResourcePatch : ResourcePatch() { internal var scrubbedPreviewThumbnailResourceId: Long = -1 override fun execute(context: ResourceContext) { - scrubbedPreviewThumbnailResourceId = ResourceMappingPatch.resourceMappings.single { - it.type == "id" && it.name == "thumbnail" - }.id + scrubbedPreviewThumbnailResourceId = ResourceMappingPatch.firstIdForResource( + "id", + "thumbnail" + ) } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/navigation/NavigationBarHookResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/navigation/NavigationBarHookResourcePatch.kt index 3841f2bfaa..4ae2b4182b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/navigation/NavigationBarHookResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/navigation/NavigationBarHookResourcePatch.kt @@ -13,12 +13,14 @@ internal object NavigationBarHookResourcePatch : ResourcePatch() { internal var actionBarSearchResultsViewMicId: Long = -1 override fun execute(context: ResourceContext) { - imageOnlyTabResourceId = ResourceMappingPatch.resourceMappings.first { - it.type == "layout" && it.name == "image_only_tab" - }.id + imageOnlyTabResourceId = ResourceMappingPatch.firstIdForResource( + "layout", + "image_only_tab" + ) - actionBarSearchResultsViewMicId = ResourceMappingPatch.resourceMappings.first { - it.type == "layout" && it.name == "action_bar_search_results_view_mic" - }.id + actionBarSearchResultsViewMicId = ResourceMappingPatch.firstIdForResource( + "layout", + "action_bar_search_results_view_mic" + ) } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/BottomControlsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/BottomControlsResourcePatch.kt index d2b1c195dc..3fdc74d458 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/BottomControlsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/BottomControlsResourcePatch.kt @@ -24,8 +24,10 @@ object BottomControlsResourcePatch : ResourcePatch(), Closeable { resourceContext = context targetDocumentEditor = context.xmlEditor[TARGET_RESOURCE] - bottomUiContainerResourceId = ResourceMappingPatch.resourceMappings - .single { it.type == "id" && it.name == "bottom_ui_container_stub" }.id + bottomUiContainerResourceId = ResourceMappingPatch.firstIdForResource( + "id", + "bottom_ui_container_stub" + ) } /** diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsResourcePatch.kt index 3f8b1d16d2..c6b5f8cef1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsResourcePatch.kt @@ -32,9 +32,10 @@ object SettingsResourcePatch : BaseSettingsResourcePatch( // Used for a fingerprint from SettingsPatch. appearanceStringId = - ResourceMappingPatch.resourceMappings.find { - it.type == "string" && it.name == "app_theme_appearance_dark" - }!!.id + ResourceMappingPatch.firstIdForResource( + "string", + "app_theme_appearance_dark" + ) arrayOf( ResourceGroup("layout", "revanced_settings_with_toolbar.xml"), diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/CustomPlaybackSpeedResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/CustomPlaybackSpeedResourcePatch.kt index 2fc51faaa8..ccb8e31e68 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/CustomPlaybackSpeedResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/CustomPlaybackSpeedResourcePatch.kt @@ -8,8 +8,9 @@ internal object CustomPlaybackSpeedResourcePatch : ResourcePatch() { var speedUnavailableId: Long = -1 override fun execute(context: ResourceContext) { - speedUnavailableId = ResourceMappingPatch.resourceMappings.single { - it.type == "string" && it.name == "varispeed_unavailable_message" - }.id + speedUnavailableId = ResourceMappingPatch.firstIdForResource( + "string", + "varispeed_unavailable_message" + ) } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuResourcePatch.kt index 7221e80b1d..268df07fbf 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuResourcePatch.kt @@ -1,7 +1,6 @@ package app.revanced.patches.youtube.video.videoqualitymenu import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.patch.PatchException import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotation.Patch import app.revanced.patches.all.misc.resources.AddResourcesPatch @@ -22,10 +21,10 @@ object RestoreOldVideoQualityMenuResourcePatch : ResourcePatch() { SwitchPreference("revanced_restore_old_video_quality_menu") ) - fun findResource(name: String) = ResourceMappingPatch.resourceMappings.find { it.name == name }?.id - ?: throw PatchException("Could not find resource") - // Used for the old type of the video quality menu. - videoQualityBottomSheetListFragmentTitle = findResource("video_quality_bottom_sheet_list_fragment_title") + videoQualityBottomSheetListFragmentTitle = ResourceMappingPatch.firstIdForResource( + "layout", + "video_quality_bottom_sheet_list_fragment_title" + ) } } diff --git a/src/main/kotlin/app/revanced/util/BytecodeUtils.kt b/src/main/kotlin/app/revanced/util/BytecodeUtils.kt index bf5f759f06..a09ee96a95 100644 --- a/src/main/kotlin/app/revanced/util/BytecodeUtils.kt +++ b/src/main/kotlin/app/revanced/util/BytecodeUtils.kt @@ -68,28 +68,30 @@ fun MutableMethod.injectHideViewCall( /** * Find the index of the first instruction with the id of the given resource name. * + * Using this method requires adding [ResourceMappingPatch] as a dependency. + * * @param resourceName the name of the resource to find the id for. * @return the index of the first instruction with the id of the given resource name, or -1 if not found. + * @throws PatchException if the resource cannot be found. * @see [firstIndexForIdResource] */ fun Method.findIndexForIdResource(resourceName: String): Int { - val resource = ResourceMappingPatch.resourceMappings.find { - it.type == "id" && it.name == resourceName - } ?: throw PatchException("Could not find resource id: $resourceName") - - return indexOfFirstWideLiteralInstructionValue(resource.id) + val resourceId = ResourceMappingPatch.firstIdForResource("id", resourceName) + return indexOfFirstWideLiteralInstructionValue(resourceId) } /** * Identical to [findIndexForIdResource], except this throws an exception if the method does not contain * the resource id literal value. * + * Using this method requires adding [ResourceMappingPatch] as a dependency. + * * @throws [PatchException] if the resource is not found, or the method does not contain the resource id literal value. */ fun Method.firstIndexForIdResource(resourceName: String): Int { - val index = findIndexForIdResource(resourceName); + val index = findIndexForIdResource(resourceName) if (index < 0) throw PatchException("Found resource id for: '$resourceName' but method does not contain the id: $this") - return index; + return index } /** From 124c29e775b34053751b93dc518c2d8cfa1d7c5c Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 21 Apr 2024 01:14:37 +0200 Subject: [PATCH 9/9] refactor --- api/revanced-patches.api | 6 +- .../misc/mapping/ResourceMappingPatch.kt | 34 +++------- .../navbar/PremiumNavbarTabResourcePatch.kt | 8 +-- .../ad/general/HideAdsResourcePatch.kt | 8 +-- .../SwipeControlsBytecodePatch.kt | 20 +++--- .../autoplay/HideAutoplayButtonPatch.kt | 22 +++---- .../albumcards/AlbumCardsResourcePatch.kt | 11 ++-- .../CrowdfundingBoxResourcePatch.kt | 12 ++-- .../HideEndscreenCardsResourcePatch.kt | 17 +++-- .../filterbar/HideFilterBarResourcePatch.kt | 13 ++-- ...deFloatingMicrophoneButtonResourcePatch.kt | 8 +-- .../HideLayoutComponentsResourcePatch.kt | 12 ++-- .../infocards/HideInfocardsResourcePatch.kt | 12 ++-- .../hide/shorts/HideShortsComponentsPatch.kt | 42 +++++++------ .../HideShortsComponentsResourcePatch.kt | 23 ++++--- ...bleSuggestedVideoEndScreenResourcePatch.kt | 12 ++-- ...CustomPlayerOverlayOpacityResourcePatch.kt | 10 +-- .../ReturnYouTubeDislikeResourcePatch.kt | 14 ++--- .../seekbar/SeekbarColorResourcePatch.kt | 35 +++++------ .../sponsorblock/SponsorBlockBytecodePatch.kt | 52 +++++++-------- .../playback/SpoofSignatureResourcePatch.kt | 6 +- .../NavigationBarHookResourcePatch.kt | 15 ++--- .../BottomControlsResourcePatch.kt | 5 +- .../misc/settings/SettingsResourcePatch.kt | 6 +- .../CustomPlaybackSpeedResourcePatch.kt | 8 +-- ...RestoreOldVideoQualityMenuResourcePatch.kt | 10 +-- .../kotlin/app/revanced/util/BytecodeUtils.kt | 63 ++++++++++--------- 27 files changed, 226 insertions(+), 258 deletions(-) diff --git a/api/revanced-patches.api b/api/revanced-patches.api index b1d51e2d5e..6ee21cc71f 100644 --- a/api/revanced-patches.api +++ b/api/revanced-patches.api @@ -724,7 +724,7 @@ public final class app/revanced/patches/shared/misc/mapping/ResourceMappingPatch public static final field INSTANCE Lapp/revanced/patches/shared/misc/mapping/ResourceMappingPatch; public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V - public final fun firstIdForResource (Ljava/lang/String;Ljava/lang/String;)J + public final fun get (Ljava/lang/String;Ljava/lang/String;)J } public final class app/revanced/patches/shared/misc/mapping/ResourceMappingPatch$ResourceElement { @@ -1847,12 +1847,12 @@ public final class app/revanced/patches/yuka/misc/unlockpremium/UnlockPremiumPat public final class app/revanced/util/BytecodeUtilsKt { public static final fun containsWideLiteralInstructionValue (Lcom/android/tools/smali/dexlib2/iface/Method;J)Z - public static final fun findIndexForIdResource (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/String;)I public static final fun findMutableMethodOf (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableClass;Lcom/android/tools/smali/dexlib2/iface/Method;)Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod; - public static final fun firstIndexForIdResource (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/String;)I public static final fun getException (Lapp/revanced/patcher/fingerprint/MethodFingerprint;)Lapp/revanced/patcher/patch/PatchException; public static final fun indexOfFirstInstruction (Lcom/android/tools/smali/dexlib2/iface/Method;Lkotlin/jvm/functions/Function1;)I public static final fun indexOfFirstWideLiteralInstructionValue (Lcom/android/tools/smali/dexlib2/iface/Method;J)I + public static final fun indexOfIdResource (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/String;)I + public static final fun indexOfIdResourceOrThrow (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/String;)I public static final fun injectHideViewCall (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;IILjava/lang/String;Ljava/lang/String;)V public static final fun resultOrThrow (Lapp/revanced/patcher/fingerprint/MethodFingerprint;)Lapp/revanced/patcher/fingerprint/MethodFingerprintResult; public static final fun returnEarly (Ljava/util/List;Z)V diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/mapping/ResourceMappingPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/mapping/ResourceMappingPatch.kt index b89ce41e74..388c4ef613 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/mapping/ResourceMappingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/mapping/ResourceMappingPatch.kt @@ -1,7 +1,6 @@ package app.revanced.patches.shared.misc.mapping import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.patch.PatchException import app.revanced.patcher.patch.ResourcePatch import org.w3c.dom.Element import java.util.* @@ -9,19 +8,15 @@ import java.util.concurrent.Executors import java.util.concurrent.TimeUnit object ResourceMappingPatch : ResourcePatch() { - internal lateinit var resourceMappings: List - private set + private val resourceMappings = Collections.synchronizedList(mutableListOf()) private val THREAD_COUNT = Runtime.getRuntime().availableProcessors() private val threadPoolExecutor = Executors.newFixedThreadPool(THREAD_COUNT) override fun execute(context: ResourceContext) { - // save the file in memory to concurrently read from + // sSve the file in memory to concurrently read from it. val resourceXmlFile = context.get("res/values/public.xml").readBytes() - // create a synchronized list to store the resource mappings - val mappings = Collections.synchronizedList(mutableListOf()) - for (threadIndex in 0 until THREAD_COUNT) { threadPoolExecutor.execute thread@{ context.xmlEditor[resourceXmlFile.inputStream()].use { editor -> @@ -34,7 +29,7 @@ object ResourceMappingPatch : ResourcePatch() { val batchStart = jobSize * threadIndex val batchEnd = jobSize * (threadIndex + 1) element@ for (i in batchStart until batchEnd) { - // make sure to not go out of bounds when rounding errors occur at calculating the jobSize + // Prevent out of bounds. if (i >= resourcesLength) return@thread val node = resources.item(i) @@ -47,29 +42,18 @@ object ResourceMappingPatch : ResourcePatch() { val id = node.getAttribute("id").substring(2).toLong(16) - mappings.add(ResourceElement(typeAttribute, nameAttribute, id)) + resourceMappings.add(ResourceElement(typeAttribute, nameAttribute, id)) } } } } - threadPoolExecutor - .also { it.shutdown() } - .awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS) - - resourceMappings = mappings + threadPoolExecutor.also { it.shutdown() }.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS) } - data class ResourceElement(val type: String, val name: String, val id: Long) - - /** - * @throws PatchException if the resource is not found. - */ - fun firstIdForResource(type: String, name: String) : Long { - val resource = resourceMappings.find { - it.type == type && it.name == name - } ?: throw PatchException("Could not find resource type: $type with name: $name") + operator fun get(type: String, name: String) = resourceMappings.first { + it.type == type && it.name == name + }.id - return resource.id - } + data class ResourceElement(val type: String, val name: String, val id: Long) } diff --git a/src/main/kotlin/app/revanced/patches/spotify/navbar/PremiumNavbarTabResourcePatch.kt b/src/main/kotlin/app/revanced/patches/spotify/navbar/PremiumNavbarTabResourcePatch.kt index aa262f74d8..40018925d3 100644 --- a/src/main/kotlin/app/revanced/patches/spotify/navbar/PremiumNavbarTabResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/spotify/navbar/PremiumNavbarTabResourcePatch.kt @@ -11,11 +11,11 @@ object PremiumNavbarTabResourcePatch : ResourcePatch() { internal var premiumTabId = -1L override fun execute(context: ResourceContext) { - premiumTabId = ResourceMappingPatch.firstIdForResource("id", "premium_tab") + premiumTabId = ResourceMappingPatch["id", "premium_tab"] - showBottomNavigationItemsTextId = ResourceMappingPatch.firstIdForResource( + showBottomNavigationItemsTextId = ResourceMappingPatch[ "bool", - "show_bottom_navigation_items_text" - ) + "show_bottom_navigation_items_text", + ] } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsResourcePatch.kt index 5cd938cb43..8cc3ed1135 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsResourcePatch.kt @@ -14,8 +14,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch LithoFilterPatch::class, SettingsPatch::class, ResourceMappingPatch::class, - AddResourcesPatch::class - ] + AddResourcesPatch::class, + ], ) object HideAdsResourcePatch : ResourcePatch() { private const val FILTER_CLASS_DESCRIPTOR = @@ -35,11 +35,11 @@ object HideAdsResourcePatch : ResourcePatch() { SwitchPreference("revanced_hide_products_banner"), SwitchPreference("revanced_hide_shopping_links"), SwitchPreference("revanced_hide_web_search_results"), - SwitchPreference("revanced_hide_merchandise_banners") + SwitchPreference("revanced_hide_merchandise_banners"), ) LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR) - adAttributionId = ResourceMappingPatch.firstIdForResource("id", "ad_attribution") + adAttributionId = ResourceMappingPatch["id", "ad_attribution"] } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt index c4e702ac13..c49b74f59b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt @@ -20,7 +20,7 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod dependencies = [ IntegrationsPatch::class, PlayerTypeHookPatch::class, - SwipeControlsResourcePatch::class + SwipeControlsResourcePatch::class, ], compatiblePackages = [ CompatiblePackage( @@ -44,20 +44,20 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod "19.08.36", "19.09.38", "19.10.39", - "19.11.43" // 19.12.x has an issue with opening YT using external links, + "19.11.43", // 19.12.x has an issue with opening YT using external links, // and the app then crashes if double tap to skip forward/back is immediately used. // The stack trace shows a call coming from integrations SwipeController, - // but it appears to be a bug in YT itself as other target versions do not have this issue. - ] - ) - ] + // but it may be a bug in YT itself as other target versions do not have this issue. + ], + ), + ], ) @Suppress("unused") object SwipeControlsBytecodePatch : BytecodePatch( setOf( MainActivityFingerprint, - SwipeControlsHostActivityFingerprint - ) + SwipeControlsHostActivityFingerprint, + ), ) { override fun execute(context: BytecodeContext) { val wrapperClass = SwipeControlsHostActivityFingerprint.result!!.mutableClass @@ -79,9 +79,9 @@ object SwipeControlsBytecodePatch : BytecodePatch( accessFlags and AccessFlags.FINAL.value.inv(), annotations, hiddenApiRestrictions, - implementation + implementation, ).toMutable() } } } -} \ No newline at end of file +} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt index 0395b70f03..6eba4ff47a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt @@ -14,7 +14,7 @@ import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.SettingsPatch import app.revanced.patches.youtube.shared.fingerprints.LayoutConstructorFingerprint import app.revanced.util.exception -import app.revanced.util.firstIndexForIdResource +import app.revanced.util.indexOfIdResourceOrThrow import com.android.tools.smali.dexlib2.iface.instruction.Instruction import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction @@ -27,7 +27,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference IntegrationsPatch::class, SettingsPatch::class, ResourceMappingPatch::class, - AddResourcesPatch::class + AddResourcesPatch::class, ], compatiblePackages = [ CompatiblePackage( @@ -51,27 +51,27 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "19.08.36", "19.09.38", "19.10.39", - "19.11.43" - ] - ) - ] + "19.11.43", + ], + ), + ], ) @Suppress("unused") object HideAutoplayButtonPatch : BytecodePatch( - setOf(LayoutConstructorFingerprint) + setOf(LayoutConstructorFingerprint), ) { override fun execute(context: BytecodeContext) { AddResourcesPatch(this::class) SettingsPatch.PreferenceScreen.PLAYER.addPreferences( - SwitchPreference("revanced_hide_autoplay_button") + SwitchPreference("revanced_hide_autoplay_button"), ) LayoutConstructorFingerprint.result?.mutableMethod?.apply { val layoutGenMethodInstructions = implementation!!.instructions // resolve the offsets of where to insert the branch instructions and ... - val insertIndex = firstIndexForIdResource("autonav_preview_stub") + val insertIndex = indexOfIdResourceOrThrow("autonav_preview_stub") // where to branch away val branchIndex = @@ -92,8 +92,8 @@ object HideAutoplayButtonPatch : BytecodePatch( move-result v$clobberRegister if-eqz v$clobberRegister, :hidden """, - ExternalLabel("hidden", jumpInstruction) + ExternalLabel("hidden", jumpInstruction), ) } ?: throw LayoutConstructorFingerprint.exception } -} \ No newline at end of file +} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsResourcePatch.kt index 0a04623b8a..e8265b68dc 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsResourcePatch.kt @@ -12,7 +12,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch dependencies = [ SettingsPatch::class, ResourceMappingPatch::class, - AddResourcesPatch::class + AddResourcesPatch::class, ], ) internal object AlbumCardsResourcePatch : ResourcePatch() { @@ -22,12 +22,9 @@ internal object AlbumCardsResourcePatch : ResourcePatch() { AddResourcesPatch(this::class) SettingsPatch.PreferenceScreen.FEED.addPreferences( - SwitchPreference("revanced_hide_album_cards") + SwitchPreference("revanced_hide_album_cards"), ) - albumCardId = ResourceMappingPatch.firstIdForResource( - "layout", - "album_card" - ) + albumCardId = ResourceMappingPatch["layout", "album_card"] } -} \ No newline at end of file +} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxResourcePatch.kt index 49bfccd80a..f1763704c9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxResourcePatch.kt @@ -12,7 +12,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch dependencies = [ SettingsPatch::class, ResourceMappingPatch::class, - AddResourcesPatch::class + AddResourcesPatch::class, ], ) internal object CrowdfundingBoxResourcePatch : ResourcePatch() { @@ -22,12 +22,12 @@ internal object CrowdfundingBoxResourcePatch : ResourcePatch() { AddResourcesPatch(this::class) SettingsPatch.PreferenceScreen.FEED.addPreferences( - SwitchPreference("revanced_hide_crowdfunding_box") + SwitchPreference("revanced_hide_crowdfunding_box"), ) - crowdfundingBoxId = ResourceMappingPatch.firstIdForResource( + crowdfundingBoxId = ResourceMappingPatch[ "layout", - "donation_companion" - ) + "donation_companion", + ] } -} \ No newline at end of file +} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsResourcePatch.kt index 5722a7f41b..40878824af 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsResourcePatch.kt @@ -12,7 +12,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch dependencies = [ SettingsPatch::class, ResourceMappingPatch::class, - AddResourcesPatch::class + AddResourcesPatch::class, ], ) internal object HideEndscreenCardsResourcePatch : ResourcePatch() { @@ -24,16 +24,13 @@ internal object HideEndscreenCardsResourcePatch : ResourcePatch() { AddResourcesPatch(this::class) SettingsPatch.PreferenceScreen.PLAYER.addPreferences( - SwitchPreference("revanced_hide_endscreen_cards") + SwitchPreference("revanced_hide_endscreen_cards"), ) - fun findEndscreenResourceId(name: String) = ResourceMappingPatch.firstIdForResource( - "layout", - "endscreen_element_layout_$name" - ) + fun idOf(name: String) = ResourceMappingPatch["layout", "endscreen_element_layout_$name"] - layoutCircle = findEndscreenResourceId("circle") - layoutIcon = findEndscreenResourceId("icon") - layoutVideo = findEndscreenResourceId("video") + layoutCircle = idOf("circle") + layoutIcon = idOf("icon") + layoutVideo = idOf("video") } -} \ No newline at end of file +} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarResourcePatch.kt index 3d90642aab..d49df7a5b4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarResourcePatch.kt @@ -25,13 +25,12 @@ internal object HideFilterBarResourcePatch : ResourcePatch() { SwitchPreference("revanced_hide_filter_bar_feed_in_feed"), SwitchPreference("revanced_hide_filter_bar_feed_in_search"), SwitchPreference("revanced_hide_filter_bar_feed_in_related_videos"), - ) - ) + ), + ), ) - relatedChipCloudMarginId = ResourceMappingPatch.firstIdForResource("layout", "related_chip_cloud_reduced_margins") - filterBarHeightId = ResourceMappingPatch.firstIdForResource("dimen", "filter_bar_height") - barContainerHeightId = ResourceMappingPatch.firstIdForResource("dimen", "bar_container_height") + relatedChipCloudMarginId = ResourceMappingPatch["layout", "related_chip_cloud_reduced_margins"] + filterBarHeightId = ResourceMappingPatch["dimen", "filter_bar_height"] + barContainerHeightId = ResourceMappingPatch["dimen", "bar_container_height"] } - -} \ No newline at end of file +} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonResourcePatch.kt index 16a5673369..30dd8e84d1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonResourcePatch.kt @@ -12,8 +12,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch dependencies = [ SettingsPatch::class, ResourceMappingPatch::class, - AddResourcesPatch::class - ] + AddResourcesPatch::class, + ], ) internal object HideFloatingMicrophoneButtonResourcePatch : ResourcePatch() { internal var fabButtonId: Long = -1 @@ -22,9 +22,9 @@ internal object HideFloatingMicrophoneButtonResourcePatch : ResourcePatch() { AddResourcesPatch(this::class) SettingsPatch.PreferenceScreen.GENERAL_LAYOUT.addPreferences( - SwitchPreference("revanced_hide_floating_microphone_button") + SwitchPreference("revanced_hide_floating_microphone_button"), ) - fabButtonId = ResourceMappingPatch.firstIdForResource("id", "fab") + fabButtonId = ResourceMappingPatch["id", "fab"] } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsResourcePatch.kt index 778c18ef60..c7b60d544e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsResourcePatch.kt @@ -11,16 +11,16 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch dependencies = [ SettingsPatch::class, ResourceMappingPatch::class, - AddResourcesPatch::class - ] + AddResourcesPatch::class, + ], ) internal object HideLayoutComponentsResourcePatch : ResourcePatch() { internal var expandButtonDownId: Long = -1 override fun execute(context: ResourceContext) { - expandButtonDownId = ResourceMappingPatch.firstIdForResource( + expandButtonDownId = ResourceMappingPatch[ "layout", - "expand_button_down" - ) + "expand_button_down", + ] } -} \ No newline at end of file +} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfocardsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfocardsResourcePatch.kt index 0c86724935..228cc15054 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfocardsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfocardsResourcePatch.kt @@ -12,7 +12,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch dependencies = [ SettingsPatch::class, ResourceMappingPatch::class, - AddResourcesPatch::class + AddResourcesPatch::class, ], ) object HideInfocardsResourcePatch : ResourcePatch() { @@ -22,12 +22,12 @@ object HideInfocardsResourcePatch : ResourcePatch() { AddResourcesPatch(this::class) SettingsPatch.PreferenceScreen.PLAYER.addPreferences( - SwitchPreference("revanced_hide_info_cards") + SwitchPreference("revanced_hide_info_cards"), ) - drawerResourceId = ResourceMappingPatch.firstIdForResource( + drawerResourceId = ResourceMappingPatch[ "id", - "info_cards_drawer_header" - ) + "info_cards_drawer_header", + ] } -} \ No newline at end of file +} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt index 96c1ae7e2b..3471c5dfff 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt @@ -1,7 +1,5 @@ package app.revanced.patches.youtube.layout.hide.shorts -import app.revanced.util.exception -import app.revanced.util.injectHideViewCall import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction @@ -14,7 +12,9 @@ import app.revanced.patches.youtube.layout.hide.shorts.fingerprints.* import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch import app.revanced.patches.youtube.misc.litho.filter.LithoFilterPatch import app.revanced.patches.youtube.misc.navigation.NavigationBarHookPatch -import app.revanced.util.firstIndexForIdResource +import app.revanced.util.exception +import app.revanced.util.indexOfIdResourceOrThrow +import app.revanced.util.injectHideViewCall import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction @@ -27,11 +27,12 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction LithoFilterPatch::class, HideShortsComponentsResourcePatch::class, ResourceMappingPatch::class, - NavigationBarHookPatch::class + NavigationBarHookPatch::class, ], compatiblePackages = [ CompatiblePackage( - "com.google.android.youtube", [ + "com.google.android.youtube", + [ "18.32.39", "18.37.36", "18.38.44", @@ -50,10 +51,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "19.08.36", "19.09.38", "19.10.39", - "19.11.43" - ] - ) - ] + "19.11.43", + ], + ), + ], ) @Suppress("unused") object HideShortsComponentsPatch : BytecodePatch( @@ -62,8 +63,8 @@ object HideShortsComponentsPatch : BytecodePatch( ReelConstructorFingerprint, BottomNavigationBarFingerprint, RenderBottomNavigationBarParentFingerprint, - SetPivotBarVisibilityParentFingerprint - ) + SetPivotBarVisibilityParentFingerprint, + ), ) { private const val FILTER_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/youtube/patches/components/ShortsFilter;" @@ -81,7 +82,7 @@ object HideShortsComponentsPatch : BytecodePatch( insertIndex, viewRegister, FILTER_CLASS_DESCRIPTOR, - "hideShortsShelf" + "hideShortsShelf", ) } } // Do not throw an exception if not resolved. @@ -95,7 +96,6 @@ object HideShortsComponentsPatch : BytecodePatch( ShortsButtons.entries.forEach { button -> button.injectHideCall(it.mutableMethod) } } ?: throw CreateShortsButtonsFingerprint.exception - // endregion // region Hide the Shorts buttons in newer versions of YouTube. @@ -108,8 +108,9 @@ object HideShortsComponentsPatch : BytecodePatch( // Hook to get the pivotBar view. SetPivotBarVisibilityParentFingerprint.result?.let { - if (!SetPivotBarVisibilityFingerprint.resolve(context, it.classDef)) + if (!SetPivotBarVisibilityFingerprint.resolve(context, it.classDef)) { throw SetPivotBarVisibilityFingerprint.exception + } SetPivotBarVisibilityFingerprint.result!!.let { result -> result.mutableMethod.apply { @@ -118,7 +119,7 @@ object HideShortsComponentsPatch : BytecodePatch( addInstruction( insertIndex, "sput-object v$viewRegister, $FILTER_CLASS_DESCRIPTOR->pivotBar:" + - "Lcom/google/android/libraries/youtube/rendering/ui/pivotbar/PivotBar;" + "Lcom/google/android/libraries/youtube/rendering/ui/pivotbar/PivotBar;", ) } } @@ -126,8 +127,9 @@ object HideShortsComponentsPatch : BytecodePatch( // Hook to hide the navigation bar when Shorts are being played. RenderBottomNavigationBarParentFingerprint.result?.let { - if (!RenderBottomNavigationBarFingerprint.resolve(context, it.classDef)) + if (!RenderBottomNavigationBarFingerprint.resolve(context, it.classDef)) { throw RenderBottomNavigationBarFingerprint.exception + } RenderBottomNavigationBarFingerprint.result!!.mutableMethod.apply { addInstruction(0, "invoke-static { }, $FILTER_CLASS_DESCRIPTOR->hideNavigationBar()V") @@ -144,7 +146,7 @@ object HideShortsComponentsPatch : BytecodePatch( addInstruction( insertIndex, "invoke-static { v$viewRegister }, $FILTER_CLASS_DESCRIPTOR->" + - "hideNavigationBar(Landroid/view/View;)Landroid/view/View;" + "hideNavigationBar(Landroid/view/View;)Landroid/view/View;", ) } } ?: throw BottomNavigationBarFingerprint.exception @@ -152,14 +154,14 @@ object HideShortsComponentsPatch : BytecodePatch( // endregion } - private enum class ShortsButtons(private val resourceName: String, private val methodName: String) { COMMENTS("reel_dyn_comment", "hideShortsCommentsButton"), REMIX("reel_dyn_remix", "hideShortsRemixButton"), - SHARE("reel_dyn_share", "hideShortsShareButton"); + SHARE("reel_dyn_share", "hideShortsShareButton"), + ; fun injectHideCall(method: MutableMethod) { - val referencedIndex = method.firstIndexForIdResource(resourceName) + val referencedIndex = method.indexOfIdResourceOrThrow(resourceName) val setIdIndex = referencedIndex + 1 val viewRegister = method.getInstruction(setIdIndex).registerC diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt index f93c6c3db2..47381c2d57 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt @@ -50,16 +50,19 @@ object HideShortsComponentsResourcePatch : ResourcePatch() { SwitchPreference("revanced_hide_shorts_navigation_bar"), ) - // Cannot use first, as this resource does not exist in newer targets. - ResourceMappingPatch.resourceMappings.find { - it.type == "layout" && it.name == "reel_multiple_items_shelf" - }?.also { - reelMultipleItemShelfId = it.id - } - - reelPlayerRightCellButtonHeight = ResourceMappingPatch.firstIdForResource( + reelPlayerRightCellButtonHeight = ResourceMappingPatch[ "dimen", - "reel_player_right_cell_button_height" - ) + "reel_player_right_cell_button_height", + ] + + // Resource not present in new versions of the app. + try { + ResourceMappingPatch[ + "dimen", + "reel_player_right_cell_button_height", + ] + } catch (e: NoSuchElementException) { + return + }.also { reelPlayerRightCellButtonHeight = it } } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenResourcePatch.kt index 1f7103c43b..7d9c1ad617 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenResourcePatch.kt @@ -12,7 +12,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch dependencies = [ SettingsPatch::class, ResourceMappingPatch::class, - AddResourcesPatch::class + AddResourcesPatch::class, ], ) internal object DisableSuggestedVideoEndScreenResourcePatch : ResourcePatch() { @@ -22,12 +22,12 @@ internal object DisableSuggestedVideoEndScreenResourcePatch : ResourcePatch() { AddResourcesPatch(this::class) SettingsPatch.PreferenceScreen.PLAYER.addPreferences( - SwitchPreference("revanced_disable_suggested_video_end_screen") + SwitchPreference("revanced_disable_suggested_video_end_screen"), ) - sizeAdjustableLiteAutoNavOverlay = ResourceMappingPatch.firstIdForResource( + sizeAdjustableLiteAutoNavOverlay = ResourceMappingPatch[ "layout", - "size_adjustable_lite_autonav_overlay" - ) + "size_adjustable_lite_autonav_overlay", + ] } -} \ No newline at end of file +} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/CustomPlayerOverlayOpacityResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/CustomPlayerOverlayOpacityResourcePatch.kt index 5398d70f43..4037fe20ae 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/CustomPlayerOverlayOpacityResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/CustomPlayerOverlayOpacityResourcePatch.kt @@ -10,7 +10,7 @@ import app.revanced.patches.shared.misc.settings.preference.TextPreference import app.revanced.patches.youtube.misc.settings.SettingsPatch @Patch( - dependencies = [SettingsPatch::class, ResourceMappingPatch::class, AddResourcesPatch::class] + dependencies = [SettingsPatch::class, ResourceMappingPatch::class, AddResourcesPatch::class], ) internal object CustomPlayerOverlayOpacityResourcePatch : ResourcePatch() { internal var scrimOverlayId = -1L @@ -19,12 +19,12 @@ internal object CustomPlayerOverlayOpacityResourcePatch : ResourcePatch() { AddResourcesPatch(this::class) SettingsPatch.PreferenceScreen.PLAYER.addPreferences( - TextPreference("revanced_player_overlay_opacity", inputType = InputType.NUMBER) + TextPreference("revanced_player_overlay_opacity", inputType = InputType.NUMBER), ) - scrimOverlayId = ResourceMappingPatch.firstIdForResource( + scrimOverlayId = ResourceMappingPatch[ "id", - "scrim_overlay" - ) + "scrim_overlay", + ] } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikeResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikeResourcePatch.kt index af689715a4..d39a8fa3e1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikeResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikeResourcePatch.kt @@ -12,8 +12,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsResourcePatch @Patch( dependencies = [ SettingsPatch::class, - AddResourcesPatch::class - ] + AddResourcesPatch::class, + ], ) internal object ReturnYouTubeDislikeResourcePatch : ResourcePatch() { internal var oldUIDislikeId: Long = -1 @@ -25,12 +25,12 @@ internal object ReturnYouTubeDislikeResourcePatch : ResourcePatch() { key = "revanced_settings_screen_09", titleKey = "revanced_ryd_settings_title", summaryKey = null, - intent = SettingsPatch.newIntent("revanced_ryd_settings_intent") + intent = SettingsPatch.newIntent("revanced_ryd_settings_intent"), ) - oldUIDislikeId = ResourceMappingPatch.firstIdForResource( + oldUIDislikeId = ResourceMappingPatch[ "id", - "dislike_button" - ) + "dislike_button", + ] } -} \ No newline at end of file +} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/SeekbarColorResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/SeekbarColorResourcePatch.kt index 410d94cb3d..84ea503a42 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/SeekbarColorResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/SeekbarColorResourcePatch.kt @@ -15,22 +15,18 @@ internal object SeekbarColorResourcePatch : ResourcePatch() { internal var inlineTimeBarPlayedNotHighlightedColorId = -1L override fun execute(context: ResourceContext) { - - reelTimeBarPlayedColorId = - ResourceMappingPatch.firstIdForResource( - "color", - "reel_time_bar_played_color" - ) - inlineTimeBarColorizedBarPlayedColorDarkId = - ResourceMappingPatch.firstIdForResource( - "color", - "inline_time_bar_colorized_bar_played_color_dark" - ) - inlineTimeBarPlayedNotHighlightedColorId = - ResourceMappingPatch.firstIdForResource( - "color", - "inline_time_bar_played_not_highlighted_color" - ) + reelTimeBarPlayedColorId = ResourceMappingPatch[ + "color", + "reel_time_bar_played_color", + ] + inlineTimeBarColorizedBarPlayedColorDarkId = ResourceMappingPatch[ + "color", + "inline_time_bar_colorized_bar_played_color_dark", + ] + inlineTimeBarPlayedNotHighlightedColorId = ResourceMappingPatch[ + "color", + "inline_time_bar_played_not_highlighted_color", + ] // Edit the resume playback drawable and replace the progress bar with a custom drawable context.xmlEditor["res/drawable/resume_playback_progressbar_drawable.xml"].use { editor -> @@ -43,10 +39,9 @@ internal object SeekbarColorResourcePatch : ResourcePatch() { } val scaleNode = progressNode.getElementsByTagName("scale").item(0) as Element val shapeNode = scaleNode.getElementsByTagName("shape").item(0) as Element - val replacementNode = - document.createElement( - "app.revanced.integrations.youtube.patches.theme.ProgressBarDrawable", - ) + val replacementNode = document.createElement( + "app.revanced.integrations.youtube.patches.theme.ProgressBarDrawable", + ) scaleNode.replaceChild(replacementNode, shapeNode) } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt index 7659b05732..8ba36ef11c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt @@ -1,6 +1,5 @@ package app.revanced.patches.youtube.layout.sponsorblock -import app.revanced.util.exception import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstructions @@ -25,6 +24,7 @@ import app.revanced.patches.youtube.shared.fingerprints.SeekbarFingerprint import app.revanced.patches.youtube.shared.fingerprints.SeekbarOnDrawFingerprint import app.revanced.patches.youtube.video.information.VideoInformationPatch import app.revanced.patches.youtube.video.videoid.VideoIdPatch +import app.revanced.util.exception import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.iface.instruction.* import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c @@ -37,7 +37,8 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference description = "Adds options to enable and configure SponsorBlock, which can skip undesired video segments such as sponsored content.", compatiblePackages = [ CompatiblePackage( - "com.google.android.youtube", [ + "com.google.android.youtube", + [ "18.48.39", "18.49.37", "19.01.34", @@ -50,9 +51,9 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference "19.08.36", "19.09.38", "19.10.39", - "19.11.43" - ] - ) + "19.11.43", + ], + ), ], dependencies = [ IntegrationsPatch::class, @@ -62,8 +63,8 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference // Used to prevent SponsorBlock from running on Shorts because SponsorBlock does not yet support Shorts. PlayerTypeHookPatch::class, PlayerControlsBytecodePatch::class, - SponsorBlockResourcePatch::class - ] + SponsorBlockResourcePatch::class, + ], ) @Suppress("unused") object SponsorBlockBytecodePatch : BytecodePatch( @@ -71,8 +72,8 @@ object SponsorBlockBytecodePatch : BytecodePatch( SeekbarFingerprint, AppendTimeFingerprint, LayoutConstructorFingerprint, - AutoRepeatParentFingerprint - ) + AutoRepeatParentFingerprint, + ), ) { private const val INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/youtube/sponsorblock/SegmentPlaybackController;" @@ -85,8 +86,9 @@ object SponsorBlockBytecodePatch : BytecodePatch( override fun execute(context: BytecodeContext) { LayoutConstructorFingerprint.result?.let { - if (!ControlsOverlayFingerprint.resolve(context, it.classDef)) + if (!ControlsOverlayFingerprint.resolve(context, it.classDef)) { throw ControlsOverlayFingerprint.exception + } } ?: throw LayoutConstructorFingerprint.exception /* @@ -95,7 +97,7 @@ object SponsorBlockBytecodePatch : BytecodePatch( with(VideoInformationPatch) { videoTimeHook( INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR, - "setVideoTime" + "setVideoTime", ) } @@ -123,7 +125,7 @@ object SponsorBlockBytecodePatch : BytecodePatch( seekbarMethod.addInstruction( moveRectangleToRegisterIndex + 1, "invoke-static/range {p0 .. p0}, " + - "$INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR->setSponsorBarRect(Ljava/lang/Object;)V" + "$INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR->setSponsorBarRect(Ljava/lang/Object;)V", ) for ((index, instruction) in seekbarMethodInstructions.withIndex()) { @@ -138,7 +140,7 @@ object SponsorBlockBytecodePatch : BytecodePatch( seekbarMethod.addInstruction( insertIndex, "invoke-static {v${invokeInstruction.registerC}}, " + - "$INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR->setSponsorBarThickness(I)V" + "$INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR->setSponsorBarThickness(I)V", ) break } @@ -156,7 +158,7 @@ object SponsorBlockBytecodePatch : BytecodePatch( } seekbarMethod.addInstruction( i, - "invoke-static {v$canvasInstance, v$centerY}, $INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR->drawSponsorTimeBars(Landroid/graphics/Canvas;F)V" + "invoke-static {v$canvasInstance, v$centerY}, $INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR->drawSponsorTimeBars(Landroid/graphics/Canvas;F)V", ) break @@ -168,9 +170,9 @@ object SponsorBlockBytecodePatch : BytecodePatch( val controlsMethodResult = PlayerControlsBytecodePatch.showPlayerControlsFingerprintResult val controlsLayoutStubResourceId = - ResourceMappingPatch.firstIdForResource("id", "controls_layout_stub") + ResourceMappingPatch["id", "controls_layout_stub"] val zoomOverlayResourceId = - ResourceMappingPatch.firstIdForResource("id", "video_zoom_overlay_stub") + ResourceMappingPatch["id", "video_zoom_overlay_stub"] methods@ for (method in controlsMethodResult.mutableClass.methods) { val instructions = method.implementation?.instructions!! @@ -190,7 +192,7 @@ object SponsorBlockBytecodePatch : BytecodePatch( """ invoke-static {v$inflatedViewRegister}, $INTEGRATIONS_CREATE_SEGMENT_BUTTON_CONTROLLER_CLASS_DESCRIPTOR->initialize(Landroid/view/View;)V invoke-static {v$inflatedViewRegister}, $INTEGRATIONS_VOTING_BUTTON_CONTROLLER_CLASS_DESCRIPTOR->initialize(Landroid/view/View;)V - """ + """, ) } @@ -203,7 +205,7 @@ object SponsorBlockBytecodePatch : BytecodePatch( """ invoke-static {p1}, $INTEGRATIONS_CREATE_SEGMENT_BUTTON_CONTROLLER_CLASS_DESCRIPTOR->changeVisibilityNegatedImmediate(Z)V invoke-static {p1}, $INTEGRATIONS_VOTING_BUTTON_CONTROLLER_CLASS_DESCRIPTOR->changeVisibilityNegatedImmediate(Z)V - """.trimIndent() + """.trimIndent(), ) } } @@ -225,7 +227,7 @@ object SponsorBlockBytecodePatch : BytecodePatch( """ invoke-static {v$targetRegister}, $INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR->appendTimeWithoutSegments(Ljava/lang/String;)Ljava/lang/String; move-result-object v$targetRegister - """ + """, ) // initialize the player controller @@ -238,10 +240,10 @@ object SponsorBlockBytecodePatch : BytecodePatch( val frameLayoutRegister = (getInstruction(startIndex + 2) as OneRegisterInstruction).registerA addInstruction( startIndex + 3, - "invoke-static {v$frameLayoutRegister}, $INTEGRATIONS_SPONSORBLOCK_VIEW_CONTROLLER_CLASS_DESCRIPTOR->initialize(Landroid/view/ViewGroup;)V" + "invoke-static {v$frameLayoutRegister}, $INTEGRATIONS_SPONSORBLOCK_VIEW_CONTROLLER_CLASS_DESCRIPTOR->initialize(Landroid/view/ViewGroup;)V", ) } - } ?: throw ControlsOverlayFingerprint.exception + } ?: throw ControlsOverlayFingerprint.exception // get rectangle field name RectangleFieldInvalidatorFingerprint.resolve(context, seekbarSignatureResult.classDef) @@ -260,7 +262,8 @@ object SponsorBlockBytecodePatch : BytecodePatch( fun MutableMethod.replaceStringInstruction(index: Int, instruction: Instruction, with: String) { val register = (instruction as OneRegisterInstruction).registerA this.replaceInstruction( - index, "const-string v$register, \"$with\"" + index, + "const-string v$register, \"$with\"", ) } for ((index, it) in method.implementation!!.instructions.withIndex()) { @@ -270,13 +273,12 @@ object SponsorBlockBytecodePatch : BytecodePatch( "replaceMeWithsetSponsorBarRect" -> method.replaceStringInstruction( index, it, - rectangleFieldName + rectangleFieldName, ) } } } ?: throw PatchException("Could not find the method which contains the replaceMeWith* strings") - // The vote and create segment buttons automatically change their visibility when appropriate, // but if buttons are showing when the end of the video is reached then they will not automatically hide. // Add a hook to forcefully hide when the end of the video is reached. @@ -285,7 +287,7 @@ object SponsorBlockBytecodePatch : BytecodePatch( it.resolve(context, AutoRepeatParentFingerprint.result!!.classDef) }.result?.mutableMethod?.addInstruction( 0, - "invoke-static {}, $INTEGRATIONS_SPONSORBLOCK_VIEW_CONTROLLER_CLASS_DESCRIPTOR->endOfVideoReached()V" + "invoke-static {}, $INTEGRATIONS_SPONSORBLOCK_VIEW_CONTROLLER_CLASS_DESCRIPTOR->endOfVideoReached()V", ) ?: throw AutoRepeatFingerprint.exception // TODO: isSBChannelWhitelisting implementation diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofSignatureResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofSignatureResourcePatch.kt index ef0f1e2f5e..d65e23ee37 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofSignatureResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofSignatureResourcePatch.kt @@ -11,9 +11,9 @@ object SpoofSignatureResourcePatch : ResourcePatch() { internal var scrubbedPreviewThumbnailResourceId: Long = -1 override fun execute(context: ResourceContext) { - scrubbedPreviewThumbnailResourceId = ResourceMappingPatch.firstIdForResource( + scrubbedPreviewThumbnailResourceId = ResourceMappingPatch[ "id", - "thumbnail" - ) + "thumbnail", + ] } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/navigation/NavigationBarHookResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/navigation/NavigationBarHookResourcePatch.kt index 4ae2b4182b..614fbd65ce 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/navigation/NavigationBarHookResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/navigation/NavigationBarHookResourcePatch.kt @@ -6,21 +6,14 @@ import app.revanced.patcher.patch.annotation.Patch import app.revanced.patches.shared.misc.mapping.ResourceMappingPatch @Patch( - dependencies = [ResourceMappingPatch::class] + dependencies = [ResourceMappingPatch::class], ) internal object NavigationBarHookResourcePatch : ResourcePatch() { internal var imageOnlyTabResourceId: Long = -1 internal var actionBarSearchResultsViewMicId: Long = -1 override fun execute(context: ResourceContext) { - imageOnlyTabResourceId = ResourceMappingPatch.firstIdForResource( - "layout", - "image_only_tab" - ) - - actionBarSearchResultsViewMicId = ResourceMappingPatch.firstIdForResource( - "layout", - "action_bar_search_results_view_mic" - ) + imageOnlyTabResourceId = ResourceMappingPatch["layout", "image_only_tab"] + actionBarSearchResultsViewMicId = ResourceMappingPatch["layout", "action_bar_search_results_view_mic"] } -} \ No newline at end of file +} diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/BottomControlsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/BottomControlsResourcePatch.kt index 3fdc74d458..474ccf4798 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/BottomControlsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/BottomControlsResourcePatch.kt @@ -24,10 +24,7 @@ object BottomControlsResourcePatch : ResourcePatch(), Closeable { resourceContext = context targetDocumentEditor = context.xmlEditor[TARGET_RESOURCE] - bottomUiContainerResourceId = ResourceMappingPatch.firstIdForResource( - "id", - "bottom_ui_container_stub" - ) + bottomUiContainerResourceId = ResourceMappingPatch["id", "bottom_ui_container_stub"] } /** diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsResourcePatch.kt index c6b5f8cef1..2783a0266d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsResourcePatch.kt @@ -31,11 +31,7 @@ object SettingsResourcePatch : BaseSettingsResourcePatch( AddResourcesPatch(this::class) // Used for a fingerprint from SettingsPatch. - appearanceStringId = - ResourceMappingPatch.firstIdForResource( - "string", - "app_theme_appearance_dark" - ) + appearanceStringId = ResourceMappingPatch["string", "app_theme_appearance_dark"] arrayOf( ResourceGroup("layout", "revanced_settings_with_toolbar.xml"), diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/CustomPlaybackSpeedResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/CustomPlaybackSpeedResourcePatch.kt index ccb8e31e68..0981e7f550 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/CustomPlaybackSpeedResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/CustomPlaybackSpeedResourcePatch.kt @@ -8,9 +8,9 @@ internal object CustomPlaybackSpeedResourcePatch : ResourcePatch() { var speedUnavailableId: Long = -1 override fun execute(context: ResourceContext) { - speedUnavailableId = ResourceMappingPatch.firstIdForResource( + speedUnavailableId = ResourceMappingPatch[ "string", - "varispeed_unavailable_message" - ) + "varispeed_unavailable_message", + ] } -} \ No newline at end of file +} diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuResourcePatch.kt index 268df07fbf..8de2a9b0e5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/RestoreOldVideoQualityMenuResourcePatch.kt @@ -9,7 +9,7 @@ import app.revanced.patches.shared.misc.settings.preference.SwitchPreference import app.revanced.patches.youtube.misc.settings.SettingsPatch @Patch( - dependencies = [SettingsPatch::class, ResourceMappingPatch::class, AddResourcesPatch::class] + dependencies = [SettingsPatch::class, ResourceMappingPatch::class, AddResourcesPatch::class], ) object RestoreOldVideoQualityMenuResourcePatch : ResourcePatch() { internal var videoQualityBottomSheetListFragmentTitle = -1L @@ -18,13 +18,13 @@ object RestoreOldVideoQualityMenuResourcePatch : ResourcePatch() { AddResourcesPatch(this::class) SettingsPatch.PreferenceScreen.VIDEO.addPreferences( - SwitchPreference("revanced_restore_old_video_quality_menu") + SwitchPreference("revanced_restore_old_video_quality_menu"), ) // Used for the old type of the video quality menu. - videoQualityBottomSheetListFragmentTitle = ResourceMappingPatch.firstIdForResource( + videoQualityBottomSheetListFragmentTitle = ResourceMappingPatch[ "layout", - "video_quality_bottom_sheet_list_fragment_title" - ) + "video_quality_bottom_sheet_list_fragment_title", + ] } } diff --git a/src/main/kotlin/app/revanced/util/BytecodeUtils.kt b/src/main/kotlin/app/revanced/util/BytecodeUtils.kt index a09ee96a95..ccd9c1b084 100644 --- a/src/main/kotlin/app/revanced/util/BytecodeUtils.kt +++ b/src/main/kotlin/app/revanced/util/BytecodeUtils.kt @@ -15,7 +15,6 @@ import com.android.tools.smali.dexlib2.iface.instruction.WideLiteralInstruction import com.android.tools.smali.dexlib2.iface.reference.Reference import com.android.tools.smali.dexlib2.util.MethodUtil - fun MethodFingerprint.resultOrThrow() = result ?: throw exception /** @@ -59,38 +58,40 @@ fun MutableMethod.injectHideViewCall( insertIndex: Int, viewRegister: Int, classDescriptor: String, - targetMethod: String + targetMethod: String, ) = addInstruction( insertIndex, - "invoke-static { v$viewRegister }, $classDescriptor->$targetMethod(Landroid/view/View;)V" + "invoke-static { v$viewRegister }, $classDescriptor->$targetMethod(Landroid/view/View;)V", ) /** - * Find the index of the first instruction with the id of the given resource name. + * Get the index of the first instruction with the id of the given resource name. * - * Using this method requires adding [ResourceMappingPatch] as a dependency. + * Requires [ResourceMappingPatch] as a dependency. * * @param resourceName the name of the resource to find the id for. * @return the index of the first instruction with the id of the given resource name, or -1 if not found. * @throws PatchException if the resource cannot be found. - * @see [firstIndexForIdResource] + * @see [indexOfIdResourceOrThrow] */ -fun Method.findIndexForIdResource(resourceName: String): Int { - val resourceId = ResourceMappingPatch.firstIdForResource("id", resourceName) +fun Method.indexOfIdResource(resourceName: String): Int { + val resourceId = ResourceMappingPatch["id", resourceName] return indexOfFirstWideLiteralInstructionValue(resourceId) } /** - * Identical to [findIndexForIdResource], except this throws an exception if the method does not contain - * the resource id literal value. + * Get the index of the first instruction with the id of the given resource name or throw a [PatchException]. * - * Using this method requires adding [ResourceMappingPatch] as a dependency. + * Requires [ResourceMappingPatch] as a dependency. * * @throws [PatchException] if the resource is not found, or the method does not contain the resource id literal value. */ -fun Method.firstIndexForIdResource(resourceName: String): Int { - val index = findIndexForIdResource(resourceName) - if (index < 0) throw PatchException("Found resource id for: '$resourceName' but method does not contain the id: $this") +fun Method.indexOfIdResourceOrThrow(resourceName: String): Int { + val index = indexOfIdResource(resourceName) + if (index < 0) { + throw PatchException("Found resource id for: '$resourceName' but method does not contain the id: $this") + } + return index } @@ -145,27 +146,29 @@ inline fun Instruction.getReference() = (this as? Refere fun Method.indexOfFirstInstruction(predicate: Instruction.() -> Boolean) = this.implementation!!.instructions.indexOfFirst(predicate) - /** - * Return the resolved methods of [MethodFingerprint]s early. - */ - fun List.returnEarly(bool: Boolean = false) { - val const = if (bool) "0x1" else "0x0" - this.forEach { fingerprint -> - fingerprint.result?.let { result -> - val stringInstructions = when (result.method.returnType.first()) { - 'L' -> """ +/** + * Return the resolved methods of [MethodFingerprint]s early. + */ +fun List.returnEarly(bool: Boolean = false) { + val const = if (bool) "0x1" else "0x0" + this.forEach { fingerprint -> + fingerprint.result?.let { result -> + val stringInstructions = when (result.method.returnType.first()) { + 'L' -> + """ const/4 v0, $const return-object v0 """ - 'V' -> "return-void" - 'I', 'Z' -> """ + 'V' -> "return-void" + 'I', 'Z' -> + """ const/4 v0, $const return v0 """ - else -> throw Exception("This case should never happen.") - } + else -> throw Exception("This case should never happen.") + } - result.mutableMethod.addInstructions(0, stringInstructions) - } ?: throw fingerprint.exception - } + result.mutableMethod.addInstructions(0, stringInstructions) + } ?: throw fingerprint.exception } +}