diff --git a/src/main/kotlin/app/revanced/patches/music/layout/blacknavbar/fingerprints/TabLayoutFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/layout/blacknavbar/fingerprints/TabLayoutFingerprint.kt index 8ba86abbf..c21fedff1 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/blacknavbar/fingerprints/TabLayoutFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/blacknavbar/fingerprints/TabLayoutFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.music.layout.blacknavbar.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.music.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.music.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.Opcode @@ -19,7 +19,7 @@ object TabLayoutFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.colorGreyLabelId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.colorGreyLabelId } == true } ) diff --git a/src/main/kotlin/app/revanced/patches/music/layout/blacknavbar/patch/BlackNavbarPatch.kt b/src/main/kotlin/app/revanced/patches/music/layout/blacknavbar/patch/BlackNavbarPatch.kt index 5928956b3..719512555 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/blacknavbar/patch/BlackNavbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/blacknavbar/patch/BlackNavbarPatch.kt @@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.ExternalLabel import app.revanced.patches.music.layout.blacknavbar.fingerprints.TabLayoutFingerprint -import app.revanced.patches.music.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.music.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.music.misc.settings.patch.MusicSettingsPatch import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility import app.revanced.util.integrations.Constants.MUSIC_SETTINGS_PATH @@ -27,7 +27,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction31i @DependsOn( [ MusicSettingsPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeMusicCompatibility diff --git a/src/main/kotlin/app/revanced/patches/music/layout/compactheader/patch/CompactHeaderPatch.kt b/src/main/kotlin/app/revanced/patches/music/layout/compactheader/patch/CompactHeaderPatch.kt index 6e7e6be9a..2121e6aeb 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/compactheader/patch/CompactHeaderPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/compactheader/patch/CompactHeaderPatch.kt @@ -66,7 +66,7 @@ class CompactHeaderPatch : BytecodePatch() { MusicSettingsPatch.addMusicPreference("navigation", "revanced_hide_compact_header", "true") - patchSuccessArray[0] = true; + patchSuccessArray[0] = true } } } diff --git a/src/main/kotlin/app/revanced/patches/music/layout/shuffle/fingerprints/ShuffleClassFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/layout/shuffle/fingerprints/ShuffleClassFingerprint.kt index 993df76b1..2a3114899 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/shuffle/fingerprints/ShuffleClassFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/shuffle/fingerprints/ShuffleClassFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.music.layout.shuffle.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.music.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.music.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.Opcode @@ -22,7 +22,7 @@ object ShuffleClassFingerprint : MethodFingerprint( methodDef.name == "" && methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.disabledIconLabelId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.disabledIconLabelId } == true } ) diff --git a/src/main/kotlin/app/revanced/patches/music/layout/shuffle/patch/EnforceShufflePatch.kt b/src/main/kotlin/app/revanced/patches/music/layout/shuffle/patch/EnforceShufflePatch.kt index d7e8ff86f..6f40dd8c1 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/shuffle/patch/EnforceShufflePatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/shuffle/patch/EnforceShufflePatch.kt @@ -19,7 +19,7 @@ import app.revanced.patcher.util.smali.toInstructions import app.revanced.patches.music.layout.shuffle.fingerprints.MusicPlaybackControlsFingerprint import app.revanced.patches.music.layout.shuffle.fingerprints.ShuffleClassFingerprint import app.revanced.patches.music.layout.shuffle.fingerprints.ShuffleClassReferenceFingerprint -import app.revanced.patches.music.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.music.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.music.misc.settings.patch.MusicSettingsPatch import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility import app.revanced.util.integrations.Constants.MUSIC_SETTINGS_PATH @@ -38,7 +38,7 @@ import org.jf.dexlib2.immutable.ImmutableMethodParameter @DependsOn( [ MusicSettingsPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeMusicCompatibility diff --git a/src/main/kotlin/app/revanced/patches/music/layout/tabletmode/fingerprints/TabletLayoutFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/layout/tabletmode/fingerprints/TabletLayoutFingerprint.kt index d2c64efd4..25468dd9c 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/tabletmode/fingerprints/TabletLayoutFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/tabletmode/fingerprints/TabletLayoutFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.music.layout.tabletmode.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.music.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.music.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.Opcode @@ -19,7 +19,7 @@ object TabletLayoutFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.isTabletLabelId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.isTabletLabelId } == true } ) diff --git a/src/main/kotlin/app/revanced/patches/music/layout/tabletmode/patch/TabletModePatch.kt b/src/main/kotlin/app/revanced/patches/music/layout/tabletmode/patch/TabletModePatch.kt index b94ddecd6..eb133697a 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/tabletmode/patch/TabletModePatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/tabletmode/patch/TabletModePatch.kt @@ -12,7 +12,7 @@ import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.music.layout.tabletmode.fingerprints.TabletLayoutFingerprint -import app.revanced.patches.music.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.music.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.music.misc.settings.patch.MusicSettingsPatch import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility import app.revanced.util.integrations.Constants.MUSIC_SETTINGS_PATH @@ -23,7 +23,7 @@ import app.revanced.util.integrations.Constants.MUSIC_SETTINGS_PATH @DependsOn( [ MusicSettingsPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeMusicCompatibility diff --git a/src/main/kotlin/app/revanced/patches/music/misc/resourceid/patch/SharedResourceIdPatch.kt b/src/main/kotlin/app/revanced/patches/music/misc/resourceid/patch/SharedResourceIdPatch.kt index f765ea8d0..b231a07f0 100644 --- a/src/main/kotlin/app/revanced/patches/music/misc/resourceid/patch/SharedResourceIdPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/misc/resourceid/patch/SharedResourceIdPatch.kt @@ -14,7 +14,7 @@ import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch @DependsOn([ResourceMappingPatch::class]) @YouTubeMusicCompatibility @Version("0.0.1") -class SharedResourcdIdPatch : ResourcePatch { +class SharedResourceIdPatch : ResourcePatch { internal companion object { var colorGreyLabelId: Long = -1 var disabledIconLabelId: Long = -1 diff --git a/src/main/kotlin/app/revanced/patches/shared/fingerprints/PivotBarCreateButtonViewFingerprint.kt b/src/main/kotlin/app/revanced/patches/shared/fingerprints/PivotBarCreateButtonViewFingerprint.kt index d914107e0..5a195aa7c 100644 --- a/src/main/kotlin/app/revanced/patches/shared/fingerprints/PivotBarCreateButtonViewFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/shared/fingerprints/PivotBarCreateButtonViewFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.shared.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.Opcode @@ -13,7 +13,7 @@ object PivotBarCreateButtonViewFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.imageOnlyTabId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.imageOnlyTabId } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/ads/general/bytecode/patch/GeneralAdsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ads/general/bytecode/patch/GeneralAdsBytecodePatch.kt index 67976e948..ea8b96542 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ads/general/bytecode/patch/GeneralAdsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ads/general/bytecode/patch/GeneralAdsBytecodePatch.kt @@ -56,7 +56,7 @@ class GeneralAdsBytecodePatch : BytecodePatch() { val viewRegister = (invokeInstruction as Instruction35c).registerC mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "ads/GeneralAdsPatch", "hideAdAttributionView") - patchSuccessArray[0] = true; + patchSuccessArray[0] = true } resourceIds[1] -> { // breaking news @@ -68,7 +68,7 @@ class GeneralAdsBytecodePatch : BytecodePatch() { val viewRegister = (invokeInstruction as Instruction21c).registerA mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "ads/GeneralAdsPatch", "hideBreakingNewsShelf") - patchSuccessArray[1] = true; + patchSuccessArray[1] = true } resourceIds[2] -> { // album cards @@ -80,7 +80,7 @@ class GeneralAdsBytecodePatch : BytecodePatch() { val viewRegister = (invokeInstruction as Instruction21c).registerA mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "ads/GeneralAdsPatch", "hideAlbumCards") - patchSuccessArray[2] = true; + patchSuccessArray[2] = true } resourceIds[3], resourceIds[4] -> { // paid content banner @@ -94,8 +94,8 @@ class GeneralAdsBytecodePatch : BytecodePatch() { mutableMethod.addInjectCall(insertIndex, dummyRegister, viewRegister, "hidePaidContentBanner") - patchSuccessArray[3] = true; - patchSuccessArray[4] = true; + patchSuccessArray[3] = true + patchSuccessArray[4] = true } resourceIds[5] -> { // info panel @@ -109,7 +109,7 @@ class GeneralAdsBytecodePatch : BytecodePatch() { mutableMethod.addInjectCall(insertIndex + 7, dummyRegister, viewRegister, "hideInfoPanel") - patchSuccessArray[5] = true; + patchSuccessArray[5] = true } } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/etc/tooltip/fingerprints/TooltipContentViewFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/etc/tooltip/fingerprints/TooltipContentViewFingerprint.kt index 65587c238..884415686 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/etc/tooltip/fingerprints/TooltipContentViewFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/etc/tooltip/fingerprints/TooltipContentViewFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.etc.tooltip.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.Opcode @@ -14,7 +14,7 @@ object TooltipContentViewFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.tooltipLabelId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.tooltipLabelId } == true } ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/etc/tooltip/patch/TooltipContentViewPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/etc/tooltip/patch/TooltipContentViewPatch.kt index f305cc6e3..50d336b6e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/etc/tooltip/patch/TooltipContentViewPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/etc/tooltip/patch/TooltipContentViewPatch.kt @@ -13,7 +13,7 @@ import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.youtube.layout.etc.tooltip.fingerprints.TooltipContentViewFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch @Patch @@ -22,7 +22,7 @@ import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch @DependsOn( [ SettingsPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/flyoutpanel/oldqualitylayout/fingerprints/QualityMenuViewInflateFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/flyoutpanel/oldqualitylayout/fingerprints/QualityMenuViewInflateFingerprint.kt index 64e4f66a7..12cdb3c32 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/flyoutpanel/oldqualitylayout/fingerprints/QualityMenuViewInflateFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/flyoutpanel/oldqualitylayout/fingerprints/QualityMenuViewInflateFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.flyoutpanel.oldqualitylayout.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.Opcode @@ -25,7 +25,7 @@ object QualityMenuViewInflateFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.videoqualityfragmentLabelId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.videoQualityFragmentLabelId } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/flyoutpanel/oldqualitylayout/patch/OldQualityLayoutPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/flyoutpanel/oldqualitylayout/patch/OldQualityLayoutPatch.kt index 30fc9effb..6b8228595 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/flyoutpanel/oldqualitylayout/patch/OldQualityLayoutPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/flyoutpanel/oldqualitylayout/patch/OldQualityLayoutPatch.kt @@ -15,7 +15,7 @@ import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.youtube.layout.flyoutpanel.oldqualitylayout.fingerprints.* -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch import app.revanced.patches.youtube.misc.videoid.legacy.patch.LegacyVideoIdPatch import app.revanced.util.integrations.Constants.FLYOUT_PANEL_LAYOUT @@ -28,7 +28,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction [ LegacyVideoIdPatch::class, SettingsPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/fullscreen/endscreenoverlay/patch/HideEndscreenOverlayPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/fullscreen/endscreenoverlay/patch/HideEndscreenOverlayPatch.kt index 6bd73103f..9b76d731e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/fullscreen/endscreenoverlay/patch/HideEndscreenOverlayPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/fullscreen/endscreenoverlay/patch/HideEndscreenOverlayPatch.kt @@ -66,7 +66,7 @@ class HideEndscreenOverlayPatch : BytecodePatch() { """, listOf(ExternalLabel("on", mutableMethod.instruction(insertIndex))) ) - patchSuccessArray[0] = true; + patchSuccessArray[0] = true } } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/fullscreen/flimstripoverlay/fingerprints/ScrubbingLabelFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/fullscreen/flimstripoverlay/fingerprints/ScrubbingLabelFingerprint.kt index 35192c158..5f7d4512a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/fullscreen/flimstripoverlay/fingerprints/ScrubbingLabelFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/fullscreen/flimstripoverlay/fingerprints/ScrubbingLabelFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.fullscreen.flimstripoverlay.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.Opcode @@ -10,7 +10,7 @@ object ScrubbingLabelFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.scrubbingLabelId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.scrubbingLabelId } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/fullscreen/fullscreenbuttoncontainer/bytecode/patch/HideFullscreenButtonContainerBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/fullscreen/fullscreenbuttoncontainer/bytecode/patch/HideFullscreenButtonContainerBytecodePatch.kt index b5bb020fb..2495af0f3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/fullscreen/fullscreenbuttoncontainer/bytecode/patch/HideFullscreenButtonContainerBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/fullscreen/fullscreenbuttoncontainer/bytecode/patch/HideFullscreenButtonContainerBytecodePatch.kt @@ -45,7 +45,7 @@ class HideFullscreenButtonContainerBytecodePatch : BytecodePatch() { val viewRegister = (invokeInstruction as Instruction21c).registerA mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/FullscreenLayoutPatch", "hideFullscreenButtonContainer") - patchSuccessArray[0] = true; + patchSuccessArray[0] = true } } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/general/crowdfundingbox/fingerprints/CrowdfundingBoxFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/general/crowdfundingbox/fingerprints/CrowdfundingBoxFingerprint.kt index 188fc1c3a..73dec56b2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/general/crowdfundingbox/fingerprints/CrowdfundingBoxFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/general/crowdfundingbox/fingerprints/CrowdfundingBoxFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.general.crowdfundingbox.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.Opcode import org.jf.dexlib2.iface.instruction.WideLiteralInstruction @@ -14,7 +14,7 @@ object CrowdfundingBoxFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.donationCompanionResourceId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.donationCompanionResourceId } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/general/crowdfundingbox/patch/CrowdfundingBoxPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/general/crowdfundingbox/patch/CrowdfundingBoxPatch.kt index 3390df697..14deef079 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/general/crowdfundingbox/patch/CrowdfundingBoxPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/general/crowdfundingbox/patch/CrowdfundingBoxPatch.kt @@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.youtube.layout.general.crowdfundingbox.fingerprints.CrowdfundingBoxFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch import app.revanced.util.integrations.Constants.GENERAL_LAYOUT import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @@ -25,7 +25,7 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @DependsOn( [ SettingsPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/general/floatingmicrophone/fingerprints/FloatingMicrophoneFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/general/floatingmicrophone/fingerprints/FloatingMicrophoneFingerprint.kt index e774809f3..51f80fef1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/general/floatingmicrophone/fingerprints/FloatingMicrophoneFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/general/floatingmicrophone/fingerprints/FloatingMicrophoneFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.general.floatingmicrophone.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.Opcode import org.jf.dexlib2.iface.instruction.WideLiteralInstruction @@ -14,7 +14,7 @@ object FloatingMicrophoneFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.fabLabelId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.fabLabelId } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/general/floatingmicrophone/patch/FloatingMicrophonePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/general/floatingmicrophone/patch/FloatingMicrophonePatch.kt index f9062b655..259bbf4a4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/general/floatingmicrophone/patch/FloatingMicrophonePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/general/floatingmicrophone/patch/FloatingMicrophonePatch.kt @@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.youtube.layout.general.floatingmicrophone.fingerprints.FloatingMicrophoneFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch import app.revanced.util.integrations.Constants.GENERAL_LAYOUT import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @@ -25,7 +25,7 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @DependsOn( [ SettingsPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/general/headerswitch/patch/HeaderSwitchPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/general/headerswitch/patch/HeaderSwitchPatch.kt index c181e5f84..a2732b343 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/general/headerswitch/patch/HeaderSwitchPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/general/headerswitch/patch/HeaderSwitchPatch.kt @@ -61,7 +61,7 @@ class HeaderSwitchPatch : BytecodePatch() { """ ) - patchSuccessArray[0] = true; + patchSuccessArray[0] = true } } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/general/personalinformation/fingerprints/AccountSwitcherAccessibilityLabelFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/general/personalinformation/fingerprints/AccountSwitcherAccessibilityLabelFingerprint.kt index c4aa885cf..aa0f338c6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/general/personalinformation/fingerprints/AccountSwitcherAccessibilityLabelFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/general/personalinformation/fingerprints/AccountSwitcherAccessibilityLabelFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.general.personalinformation.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.Opcode import org.jf.dexlib2.iface.instruction.WideLiteralInstruction @@ -18,7 +18,7 @@ object AccountSwitcherAccessibilityLabelFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it -> it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.accountSwitcherAccessibilityLabelId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.accountSwitcherAccessibilityLabelId } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/general/pivotbar/createbutton/fingerprints/PivotBarFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/general/pivotbar/createbutton/fingerprints/PivotBarFingerprint.kt index 3d306d007..40d109d58 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/general/pivotbar/createbutton/fingerprints/PivotBarFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/general/pivotbar/createbutton/fingerprints/PivotBarFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.general.pivotbar.createbutton.finger import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.Opcode @@ -19,7 +19,7 @@ object PivotBarFingerprint : MethodFingerprint( methodDef.definingClass == "Lcom/google/android/apps/youtube/app/ui/pivotbar/PivotBar;" && methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.imageWithTextTabId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.imageWithTextTabId } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/general/pivotbar/createbutton/patch/CreateButtonRemoverPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/general/pivotbar/createbutton/patch/CreateButtonRemoverPatch.kt index 72b932941..04c272f9c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/general/pivotbar/createbutton/patch/CreateButtonRemoverPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/general/pivotbar/createbutton/patch/CreateButtonRemoverPatch.kt @@ -13,7 +13,7 @@ import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.shared.fingerprints.PivotBarCreateButtonViewFingerprint import app.revanced.patches.youtube.layout.general.pivotbar.createbutton.fingerprints.PivotBarFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch import app.revanced.util.integrations.Constants.GENERAL_LAYOUT import app.revanced.util.pivotbar.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT @@ -27,7 +27,7 @@ import org.jf.dexlib2.iface.instruction.ReferenceInstruction @DependsOn( [ SettingsPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/general/pivotbar/shortsbutton/patch/ShortsButtonRemoverPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/general/pivotbar/shortsbutton/patch/ShortsButtonRemoverPatch.kt index beedcd65e..86a4df80b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/general/pivotbar/shortsbutton/patch/ShortsButtonRemoverPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/general/pivotbar/shortsbutton/patch/ShortsButtonRemoverPatch.kt @@ -15,7 +15,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.shared.fingerprints.PivotBarCreateButtonViewFingerprint import app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.fingerprints.PivotBarEnumFingerprint import app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.fingerprints.PivotBarShortsButtonViewFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch import app.revanced.util.integrations.Constants.GENERAL_LAYOUT import app.revanced.util.pivotbar.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT @@ -27,7 +27,7 @@ import app.revanced.util.pivotbar.InjectionUtils.injectHook @DependsOn( [ SettingsPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/general/shortscomponent/patch/ShortsComponentPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/general/shortscomponent/patch/ShortsComponentPatch.kt index 39c6a373e..7052fd0eb 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/general/shortscomponent/patch/ShortsComponentPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/general/shortscomponent/patch/ShortsComponentPatch.kt @@ -64,7 +64,7 @@ class ShortsComponentPatch : BytecodePatch() { val viewRegister = (instructions.elementAt(index + 3) as OneRegisterInstruction).registerA mutableMethod.implementation!!.injectHideCall(index + 4, viewRegister, "layout/GeneralLayoutPatch", "hideShortsPlayerCommentsButton") - patchSuccessArray[0] = true; + patchSuccessArray[0] = true } resourceIds[1] -> { // shorts player remix @@ -77,7 +77,7 @@ class ShortsComponentPatch : BytecodePatch() { val viewRegister = (invokeInstruction as Instruction21c).registerA mutableMethod.implementation!!.injectHideCall(index - 1, viewRegister, "layout/GeneralLayoutPatch", "hideShortsPlayerRemixButton") - patchSuccessArray[1] = true; + patchSuccessArray[1] = true } resourceIds[2] -> { // shorts player subscriptions banner @@ -90,7 +90,7 @@ class ShortsComponentPatch : BytecodePatch() { val viewRegister = (invokeInstruction as Instruction21c).registerA mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/GeneralLayoutPatch", "hideShortsPlayerSubscriptionsButton") - patchSuccessArray[2] = true; + patchSuccessArray[2] = true } } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/general/stories/patch/HideStoriesPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/general/stories/patch/HideStoriesPatch.kt index 4ec8b3df2..64cdbfc98 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/general/stories/patch/HideStoriesPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/general/stories/patch/HideStoriesPatch.kt @@ -59,8 +59,8 @@ class HideStoriesPatch : BytecodePatch() { val viewRegister = (iPutInstruction as Instruction22c).registerA mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/GeneralLayoutPatch", "hideStoriesShelf") - patchSuccessArray[0] = true; - patchSuccessArray[1] = true; + patchSuccessArray[0] = true + patchSuccessArray[1] = true } } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/general/tabletminiplayer/fingerprints/MiniPlayerDimensionsCalculatorFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/general/tabletminiplayer/fingerprints/MiniPlayerDimensionsCalculatorFingerprint.kt index ac002f5b6..a1c963c8b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/general/tabletminiplayer/fingerprints/MiniPlayerDimensionsCalculatorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/general/tabletminiplayer/fingerprints/MiniPlayerDimensionsCalculatorFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.general.tabletminiplayer.fingerprint import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.Opcode import org.jf.dexlib2.iface.instruction.WideLiteralInstruction @@ -13,7 +13,7 @@ object MiniPlayerDimensionsCalculatorFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.floatybarQueueLabelId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.floatyBarQueueLabelId } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/general/tabletminiplayer/patch/TabletMiniPlayerPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/general/tabletminiplayer/patch/TabletMiniPlayerPatch.kt index efabfcdbd..9b61272b3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/general/tabletminiplayer/patch/TabletMiniPlayerPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/general/tabletminiplayer/patch/TabletMiniPlayerPatch.kt @@ -17,7 +17,7 @@ import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.youtube.layout.general.tabletminiplayer.fingerprints.* -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch import app.revanced.util.integrations.Constants.GENERAL_LAYOUT import org.jf.dexlib2.Opcode @@ -29,7 +29,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @DependsOn( [ SettingsPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeCompatibility @@ -105,7 +105,7 @@ class TabletMiniPlayerPatch : BytecodePatch( val parameterRegister = (instruction as OneRegisterInstruction).registerA this.insertOverride(index, parameterRegister) this.insertOverride(insertInstructions.size - 1, parameterRegister) - break; + break } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/fingerprints/LayoutCircleFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/fingerprints/LayoutCircleFingerprint.kt index 50b91822c..91b4584f0 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/fingerprints/LayoutCircleFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/fingerprints/LayoutCircleFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.player.endscreencards.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.Opcode @@ -16,7 +16,7 @@ object LayoutCircleFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.layoutCircle + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.layoutCircle } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/fingerprints/LayoutIconFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/fingerprints/LayoutIconFingerprint.kt index 2982f8c50..1cb79f9e7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/fingerprints/LayoutIconFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/fingerprints/LayoutIconFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.player.endscreencards.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.Opcode @@ -16,7 +16,7 @@ object LayoutIconFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.layoutIcon + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.layoutIcon } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/fingerprints/LayoutVideoFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/fingerprints/LayoutVideoFingerprint.kt index fdf4043ec..284af2891 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/fingerprints/LayoutVideoFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/fingerprints/LayoutVideoFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.player.endscreencards.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.Opcode @@ -16,7 +16,7 @@ object LayoutVideoFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.layoutVideo + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.layoutVideo } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/patch/HideEndscreenCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/patch/HideEndscreenCardsPatch.kt index c921cf910..e3195d434 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/patch/HideEndscreenCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/endscreencards/patch/HideEndscreenCardsPatch.kt @@ -15,7 +15,7 @@ import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.youtube.layout.player.endscreencards.fingerprints.* -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch import org.jf.dexlib2.iface.instruction.formats.Instruction21c @@ -25,7 +25,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction21c @DependsOn( [ SettingsPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/infocards/fingerprints/InfocardsIncognitoFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/infocards/fingerprints/InfocardsIncognitoFingerprint.kt index 5c264975a..d5de48fb3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/infocards/fingerprints/InfocardsIncognitoFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/infocards/fingerprints/InfocardsIncognitoFingerprint.kt @@ -1,17 +1,11 @@ package app.revanced.patches.youtube.layout.player.infocards.fingerprints -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.annotation.Version import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.shared.annotation.YouTubeCompatibility import org.jf.dexlib2.AccessFlags -@Name("infocards-incognito-fingerprint") -@YouTubeCompatibility -@Version("0.0.1") object InfocardsIncognitoFingerprint : MethodFingerprint( - returnType = "Ljava/lang/Boolean;", + returnType = "L", access = AccessFlags.PUBLIC or AccessFlags.FINAL, strings = listOf("vibrator") ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/infocards/fingerprints/InfocardsIncognitoParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/infocards/fingerprints/InfocardsIncognitoParentFingerprint.kt index d40930773..a28156499 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/infocards/fingerprints/InfocardsIncognitoParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/infocards/fingerprints/InfocardsIncognitoParentFingerprint.kt @@ -1,17 +1,11 @@ package app.revanced.patches.youtube.layout.player.infocards.fingerprints -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.annotation.Version import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.shared.annotation.YouTubeCompatibility import org.jf.dexlib2.AccessFlags -@Name("infocards-incognito-parent-fingerprint") -@YouTubeCompatibility -@Version("0.0.1") object InfocardsIncognitoParentFingerprint : MethodFingerprint( - returnType = "Ljava/lang/String;", + returnType = "L", access = AccessFlags.PUBLIC or AccessFlags.FINAL, strings = listOf("player_overlay_info_card_teaser"), ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/playeroverlayfilter/patch/PlayerOverlayFilterPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/playeroverlayfilter/patch/PlayerOverlayFilterPatch.kt index ffbd7b034..0a270fa49 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/playeroverlayfilter/patch/PlayerOverlayFilterPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/playeroverlayfilter/patch/PlayerOverlayFilterPatch.kt @@ -72,8 +72,8 @@ class PlayerOverlayFilterPatch : BytecodePatch() { """, listOf(ExternalLabel("currentcolor", mutableMethod.instruction(insertIndex + 1))) ) - patchSuccessArray[0] = true; - patchSuccessArray[1] = true; + patchSuccessArray[0] = true + patchSuccessArray[1] = true } } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/suggestactions/patch/SuggestedActionsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/suggestactions/patch/SuggestedActionsPatch.kt index 9a102ca05..976493f88 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/suggestactions/patch/SuggestedActionsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/suggestactions/patch/SuggestedActionsPatch.kt @@ -58,7 +58,7 @@ class SuggestedActionsPatch : BytecodePatch() { val viewRegister = (iPutInstruction as Instruction22c).registerA mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/PlayerLayoutPatch", "hideSuggestedActions") - patchSuccessArray[0] = true; + patchSuccessArray[0] = true } } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/seekbarcolor/patch/SeekbarColorPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/seekbarcolor/patch/SeekbarColorPatch.kt index 6a9e9e58a..8b6643b84 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/seekbarcolor/patch/SeekbarColorPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/seekbarcolor/patch/SeekbarColorPatch.kt @@ -63,7 +63,7 @@ class SeekbarColorPatch : BytecodePatch() { """ ) - patchSuccessArray[0] = true; + patchSuccessArray[0] = true } } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/seekbartapping/fingerprints/SeekbarTappingParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/seekbartapping/fingerprints/SeekbarTappingParentFingerprint.kt index f979c3c86..97f73d5cd 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/seekbartapping/fingerprints/SeekbarTappingParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/seekbartapping/fingerprints/SeekbarTappingParentFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.seekbar.seekbartapping.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.Opcode import org.jf.dexlib2.iface.instruction.WideLiteralInstruction @@ -13,7 +13,7 @@ object SeekbarTappingParentFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.accessibilityProgressTimeLabelId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.accessibilityProgressTimeLabelId } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/seekbartapping/patch/SeekbarTappingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/seekbartapping/patch/SeekbarTappingPatch.kt index 8881866fb..b158509c2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/seekbartapping/patch/SeekbarTappingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/seekbartapping/patch/SeekbarTappingPatch.kt @@ -16,7 +16,7 @@ import app.revanced.patcher.util.smali.ExternalLabel import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.youtube.layout.seekbar.seekbartapping.fingerprints.SeekbarTappingFingerprint import app.revanced.patches.youtube.layout.seekbar.seekbartapping.fingerprints.SeekbarTappingParentFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT import org.jf.dexlib2.Opcode @@ -30,7 +30,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c @DependsOn( [ SettingsPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/timestamps/fingerprints/TimeStampsContainerFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/timestamps/fingerprints/TimeStampsContainerFingerprint.kt index 992588262..fd00b3b00 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/timestamps/fingerprints/TimeStampsContainerFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/timestamps/fingerprints/TimeStampsContainerFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.seekbar.timestamps.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.Opcode import org.jf.dexlib2.iface.instruction.WideLiteralInstruction @@ -10,7 +10,7 @@ object TimeStampsContainerFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.timeStampsContainerLabelId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.timeStampsContainerLabelId } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/timestamps/patch/HideTimeStampPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/timestamps/patch/HideTimeStampPatch.kt index 31b380f3a..11b6fbb7e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/timestamps/patch/HideTimeStampPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/timestamps/patch/HideTimeStampPatch.kt @@ -15,7 +15,7 @@ import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.ExternalLabel import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.youtube.layout.seekbar.timestamps.fingerprints.TimeStampsContainerFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT @@ -25,7 +25,7 @@ import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT @DependsOn( [ SettingsPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackSettingsFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackSettingsFingerprint.kt index 2e6a6b875..9ff6d9bdb 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackSettingsFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackSettingsFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.minimizedplayback.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.Opcode @@ -22,7 +22,7 @@ object MinimizedPlaybackSettingsFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { instruction -> instruction.opcode.ordinal == Opcode.CONST.ordinal && - (instruction as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.backgroundCategoryLabelId + (instruction as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.backgroundCategoryLabelId } == true } ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/patch/MinimizedPlaybackPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/patch/MinimizedPlaybackPatch.kt index e7d0b3ca5..dfa427ea0 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/patch/MinimizedPlaybackPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/patch/MinimizedPlaybackPatch.kt @@ -19,7 +19,7 @@ import app.revanced.patcher.util.smali.ExternalLabel import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.* import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch import app.revanced.util.integrations.Constants.MISC_PATH import org.jf.dexlib2.iface.instruction.ReferenceInstruction @@ -33,7 +33,7 @@ import org.jf.dexlib2.iface.reference.MethodReference [ PlayerTypeHookPatch::class, SettingsPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playerbutton/fingerprints/LiveChatFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playerbutton/fingerprints/LiveChatFingerprint.kt index 8bc1b9139..b4956c45b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playerbutton/fingerprints/LiveChatFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playerbutton/fingerprints/LiveChatFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.misc.playerbutton.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.Opcode @@ -10,7 +10,7 @@ object LiveChatFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.liveChatButtonId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.liveChatButtonId } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playerbutton/patch/PlayerButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playerbutton/patch/PlayerButtonPatch.kt index 9f84bcd90..452c23edf 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playerbutton/patch/PlayerButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playerbutton/patch/PlayerButtonPatch.kt @@ -13,14 +13,14 @@ import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.youtube.misc.playerbutton.fingerprints.LiveChatFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.util.integrations.Constants.PLAYER_LAYOUT import org.jf.dexlib2.Opcode import org.jf.dexlib2.builder.instruction.BuilderInstruction21c import org.jf.dexlib2.builder.instruction.BuilderInstruction35c @Name("hook-player-button-patch") -@DependsOn([SharedResourcdIdPatch::class]) +@DependsOn([SharedResourceIdPatch::class]) @YouTubeCompatibility @Version("0.0.1") class PlayerButtonPatch : BytecodePatch( diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/BottomControlsInflateFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/BottomControlsInflateFingerprint.kt index 6d6efdda1..490e96e4e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/BottomControlsInflateFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/BottomControlsInflateFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.misc.playercontrols.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.Opcode @@ -14,7 +14,7 @@ object BottomControlsInflateFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.bottomUiContainerResourceId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.bottomUiContainerResourceId } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/ControlsLayoutInflateFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/ControlsLayoutInflateFingerprint.kt index 6e3fb9234..7b15c6e68 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/ControlsLayoutInflateFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/ControlsLayoutInflateFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.misc.playercontrols.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.Opcode @@ -16,7 +16,7 @@ object ControlsLayoutInflateFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.controlsLayoutStubResourceId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.controlsLayoutStubResourceId } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/patch/PlayerControlsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/patch/PlayerControlsPatch.kt index 38546f8d2..3d885a1d7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/patch/PlayerControlsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/patch/PlayerControlsPatch.kt @@ -14,11 +14,11 @@ import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.youtube.misc.playercontrols.fingerprints.* -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Name("player-controls-bytecode-patch") -@DependsOn([SharedResourcdIdPatch::class]) +@DependsOn([SharedResourceIdPatch::class]) @Description("Manages the code for the player controls of the YouTube player.") @YouTubeCompatibility @Version("0.0.1") diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/resourceid/patch/SharedResourceIdPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/resourceid/patch/SharedResourceIdPatch.kt index 9ec22f15f..37ed935bc 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/resourceid/patch/SharedResourceIdPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/resourceid/patch/SharedResourceIdPatch.kt @@ -14,18 +14,19 @@ import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch @DependsOn([ResourceMappingPatch::class]) @YouTubeCompatibility @Version("0.0.1") -class SharedResourcdIdPatch : ResourcePatch { +class SharedResourceIdPatch : ResourcePatch { internal companion object { var accessibilityProgressTimeLabelId: Long = -1 var accountSwitcherAccessibilityLabelId: Long = -1 var appearanceStringId: Long = -1 var backgroundCategoryLabelId: Long = -1 var bottomUiContainerResourceId: Long = -1 + var chapterRepeatOnResourceId: Long = -1 var controlsLayoutStubResourceId: Long = -1 var donationCompanionResourceId: Long = -1 - var emptycolorLabelId: Long = -1 + var emptyColorLabelId: Long = -1 var fabLabelId: Long = -1 - var floatybarQueueLabelId: Long = -1 + var floatyBarQueueLabelId: Long = -1 var imageOnlyTabId: Long = -1 var imageWithTextTabId: Long = -1 var layoutCircle: Long = -1 @@ -35,7 +36,7 @@ class SharedResourcdIdPatch : ResourcePatch { var scrubbingLabelId: Long = -1 var timeStampsContainerLabelId: Long = -1 var tooltipLabelId: Long = -1 - var videoqualityfragmentLabelId: Long = -1 + var videoQualityFragmentLabelId: Long = -1 } override fun execute(context: ResourceContext): PatchResult { @@ -49,11 +50,12 @@ class SharedResourcdIdPatch : ResourcePatch { appearanceStringId = findSharedResourceId("string", "app_theme_appearance_dark") backgroundCategoryLabelId = findSharedResourceId("string", "pref_background_and_offline_category") bottomUiContainerResourceId = findSharedResourceId("id", "bottom_ui_container_stub") + chapterRepeatOnResourceId = findSharedResourceId("string", "chapter_repeat_on") controlsLayoutStubResourceId = findSharedResourceId("id", "controls_layout_stub") donationCompanionResourceId = findSharedResourceId("layout", "donation_companion") - emptycolorLabelId = findSharedResourceId("color", "inline_time_bar_colorized_bar_empty_color_dark") + emptyColorLabelId = findSharedResourceId("color", "inline_time_bar_colorized_bar_empty_color_dark") fabLabelId = findSharedResourceId("id", "fab") - floatybarQueueLabelId = findSharedResourceId("string", "floaty_bar_queue_status") + floatyBarQueueLabelId = findSharedResourceId("string", "floaty_bar_queue_status") imageOnlyTabId = findSharedResourceId("layout", "image_only_tab") imageWithTextTabId = findSharedResourceId("layout", "image_with_text_tab") layoutCircle = findSharedResourceId("layout", "endscreen_element_layout_circle") @@ -63,7 +65,7 @@ class SharedResourcdIdPatch : ResourcePatch { scrubbingLabelId = findSharedResourceId("dimen", "vertical_touch_offset_to_enter_fine_scrubbing") timeStampsContainerLabelId = findSharedResourceId("id", "timestamps_container") tooltipLabelId = findSharedResourceId("layout", "tooltip_content_view") - videoqualityfragmentLabelId = findSharedResourceId("layout", "video_quality_bottom_sheet_list_fragment_title") + videoQualityFragmentLabelId = findSharedResourceId("layout", "video_quality_bottom_sheet_list_fragment_title") return PatchResultSuccess() } diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/ThemeSetterSystemFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/ThemeSetterSystemFingerprint.kt index d6a28412f..b92b80792 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/ThemeSetterSystemFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/ThemeSetterSystemFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.misc.settings.bytecode.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.Opcode @@ -11,7 +11,7 @@ object ThemeSetterSystemFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.appearanceStringId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.appearanceStringId } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsBytecodePatch.kt index 307e17f15..b66deb3af 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsBytecodePatch.kt @@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.ThemeSetterSystemFingerprint import app.revanced.util.bytecode.BytecodeHelper.injectInit import app.revanced.util.integrations.Constants.INTEGRATIONS_PATH @@ -26,7 +26,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction31i [ IntegrationsPatch::class, ResourceMappingPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/resource/patch/SettingsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/resource/patch/SettingsPatch.kt index eaa0d3db7..f6f5a2c05 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/resource/patch/SettingsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/resource/patch/SettingsPatch.kt @@ -12,7 +12,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.shared.patch.options.PatchOptions import app.revanced.patches.shared.patch.settings.AbstractSettingsResourcePatch import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsBytecodePatch import app.revanced.util.resources.ResourceHelper.addPreference import app.revanced.util.resources.ResourceHelper.addReVancedPreference @@ -28,7 +28,7 @@ import org.w3c.dom.Element [ IntegrationsPatch::class, PatchOptions::class, - SharedResourcdIdPatch::class, + SharedResourceIdPatch::class, SettingsBytecodePatch::class ] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt index 129a4fb20..c9464c335 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt @@ -14,7 +14,7 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.youtube.misc.playercontrols.patch.PlayerControlsPatch import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.sponsorblock.bytecode.fingerprints.* import app.revanced.patches.youtube.misc.timebar.patch.HookTimebarPatch import app.revanced.patches.youtube.misc.videoid.mainstream.patch.MainstreamVideoIdPatch @@ -34,7 +34,7 @@ import org.jf.dexlib2.iface.reference.MethodReference MainstreamVideoIdPatch::class, PlayerControlsPatch::class, PlayerTypeHookPatch::class, - SharedResourcdIdPatch::class + SharedResourceIdPatch::class ] ) @YouTubeCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/sponsorblock/bytecode/patch/SponsorBlockSecondaryBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/sponsorblock/bytecode/patch/SponsorBlockSecondaryBytecodePatch.kt index abafe7d2d..68f5ca1f6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/sponsorblock/bytecode/patch/SponsorBlockSecondaryBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/sponsorblock/bytecode/patch/SponsorBlockSecondaryBytecodePatch.kt @@ -13,6 +13,7 @@ import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.annotation.YouTubeCompatibility import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.formats.Instruction31i @Name("sponsorblock-secondary-bytecode-patch") @@ -41,20 +42,19 @@ class SponsorBlockSecondaryBytecodePatch : BytecodePatch() { Opcode.CONST -> { when ((instruction as Instruction31i).wideLiteral) { resourceIds[0] -> { // total time - val insertIndex = index + 3 - val invokeInstruction = instructions.elementAt(insertIndex) - if (invokeInstruction.opcode != Opcode.IGET_OBJECT) return@forEachIndexed - + val targetIndex = index + 2 + val targetInstruction = instructions.elementAt(targetIndex) + val targetRegister = (targetInstruction as OneRegisterInstruction).registerA val mutableMethod = context.proxy(classDef).mutableClass.findMutableMethodOf(method) mutableMethod.addInstructions( - insertIndex, """ - invoke-static {p1}, Lapp/revanced/integrations/sponsorblock/SponsorBlockUtils;->appendTimeWithoutSegments(Ljava/lang/String;)Ljava/lang/String; - move-result-object p1 + targetIndex + 1, """ + invoke-static {v$targetRegister}, Lapp/revanced/integrations/sponsorblock/SponsorBlockUtils;->appendTimeWithoutSegments(Ljava/lang/String;)Ljava/lang/String; + move-result-object v$targetRegister """ ) - patchSuccessArray[0] = true; + patchSuccessArray[0] = true } resourceIds[1] -> { // player overlay @@ -69,7 +69,7 @@ class SponsorBlockSecondaryBytecodePatch : BytecodePatch() { "invoke-static {p0}, Lapp/revanced/integrations/sponsorblock/player/ui/SponsorBlockView;->initialize(Ljava/lang/Object;)V" ) - patchSuccessArray[1] = true; + patchSuccessArray[1] = true } } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/timebar/fingerprints/EmptyColorFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/timebar/fingerprints/EmptyColorFingerprint.kt index b65994d87..79c59735b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/timebar/fingerprints/EmptyColorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/timebar/fingerprints/EmptyColorFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.misc.timebar.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import org.jf.dexlib2.iface.instruction.WideLiteralInstruction import org.jf.dexlib2.Opcode @@ -11,7 +11,7 @@ object EmptyColorFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.implementation?.instructions?.any { it.opcode.ordinal == Opcode.CONST.ordinal && - (it as? WideLiteralInstruction)?.wideLiteral == SharedResourcdIdPatch.emptycolorLabelId + (it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.emptyColorLabelId } == true } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/timebar/patch/HookTimebarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/timebar/patch/HookTimebarPatch.kt index ec8eacbf4..bb611e630 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/timebar/patch/HookTimebarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/timebar/patch/HookTimebarPatch.kt @@ -11,11 +11,11 @@ import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patches.shared.annotation.YouTubeCompatibility -import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch +import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch import app.revanced.patches.youtube.misc.timebar.fingerprints.* @Name("hook-timebar-patch") -@DependsOn([SharedResourcdIdPatch::class]) +@DependsOn([SharedResourceIdPatch::class]) @YouTubeCompatibility @Version("0.0.1") class HookTimebarPatch : BytecodePatch( diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/videoid/mainstream/fingerprint/MainstreamVideoIdFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/videoid/mainstream/fingerprint/MainstreamVideoIdFingerprint.kt index fd3f01f7c..a1af6f296 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/videoid/mainstream/fingerprint/MainstreamVideoIdFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/videoid/mainstream/fingerprint/MainstreamVideoIdFingerprint.kt @@ -15,6 +15,5 @@ object MainstreamVideoIdFingerprint : MethodFingerprint( Opcode.INVOKE_INTERFACE, Opcode.MOVE_RESULT_OBJECT ), - null, - { it.definingClass.endsWith("SubtitlesOverlayPresenter;") } + customFingerprint = { it.definingClass.endsWith("SubtitlesOverlayPresenter;") } )