Skip to content

Commit ff08f58

Browse files
feat(YouTube): Support version 19.03.35 (ReVanced#2640)
1 parent ba6d1dc commit ff08f58

File tree

59 files changed

+135
-64
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+135
-64
lines changed

src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
3434
"18.48.39",
3535
"18.49.37",
3636
"19.01.34",
37-
"19.02.34"
37+
"19.02.39",
38+
"19.03.35"
3839
]
3940
)
4041
]

src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
2929
"18.48.39",
3030
"18.49.37",
3131
"19.01.34",
32-
"19.02.34"
32+
"19.02.39",
33+
"19.03.35"
3334
]
3435
)
3536
]

src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
3333
"18.48.39",
3434
"18.49.37",
3535
"19.01.34",
36-
"19.02.34"
36+
"19.02.39",
37+
"19.03.35"
3738
]
3839
)
3940
]

src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
2121
"18.48.39",
2222
"18.49.37",
2323
"19.01.34",
24-
"19.02.34"
24+
"19.02.39",
25+
"19.03.35"
2526
]
2627
)
2728
]

src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
3131
"18.48.39",
3232
"18.49.37",
3333
"19.01.34",
34-
"19.02.34"
34+
"19.02.39",
35+
"19.03.35"
3536
]
3637
)
3738
]

src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/ExternalDownloadsBytecodePatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
2121
"18.48.39",
2222
"18.49.37",
2323
"19.01.34",
24-
"19.02.34"
24+
"19.02.39",
25+
"19.03.35"
2526
]
2627
),
2728
]

src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
3131
"18.48.39",
3232
"18.49.37",
3333
"19.01.34",
34-
"19.02.34"
34+
"19.02.39",
35+
"19.03.35"
3536
]
3637
)
3738
]

src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
3333
"18.48.39",
3434
"18.49.37",
3535
"19.01.34",
36-
"19.02.34"
36+
"19.02.39",
37+
"19.03.35"
3738
]
3839
)
3940
]

src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSlideToSeekPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
2929
"18.48.39",
3030
"18.49.37",
3131
"19.01.34",
32-
"19.02.34"
32+
"19.02.39",
33+
"19.03.35"
3334
]
3435
)
3536
],

src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
3535
"18.48.39",
3636
"18.49.37",
3737
"19.01.34",
38-
"19.02.34"
38+
"19.02.39",
39+
"19.03.35"
3940
]
4041
)
4142
]

src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
3333
"18.48.39",
3434
"18.49.37",
3535
"19.01.34",
36-
"19.02.34"
36+
"19.02.39",
37+
"19.03.35"
3738
]
3839
)
3940
],

src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
3131
"18.48.39",
3232
"18.49.37",
3333
"19.01.34",
34-
"19.02.34"
34+
"19.02.39",
35+
"19.03.35"
3536
]
3637
)
3738
]

src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
4141
"18.48.39",
4242
"18.49.37",
4343
"19.01.34",
44-
"19.02.34"
44+
"19.02.39",
45+
"19.03.35"
4546
]
4647
)
4748
]

src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ import com.android.tools.smali.dexlib2.Opcode
3232
"18.48.39",
3333
"18.49.37",
3434
"19.01.34",
35-
"19.02.34"
35+
"19.02.39",
36+
"19.03.35"
3637
]
3738
)
3839
]

src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
3838
"18.48.39",
3939
"18.49.37",
4040
"19.01.34",
41-
"19.02.34"
41+
"19.02.39",
42+
"19.03.35"
4243
]
4344
)
4445
]

src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction3rc
3636
"18.48.39",
3737
"18.49.37",
3838
"19.01.34",
39-
"19.02.34"
39+
"19.02.39",
40+
"19.03.35"
4041
]
4142
)
4243
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
3131
"18.48.39",
3232
"18.49.37",
3333
"19.01.34",
34-
"19.02.34"
34+
"19.02.39",
35+
"19.03.35"
3536
]
3637
)
3738
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
3131
"18.48.39",
3232
"18.49.37",
3333
"19.01.34",
34-
"19.02.34"
34+
"19.02.39",
35+
"19.03.35"
3536
]
3637
)
3738
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
3030
"18.48.39",
3131
"18.49.37",
3232
"19.01.34",
33-
"19.02.34"
33+
"19.02.39",
34+
"19.03.35"
3435
]
3536
)
3637
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
3131
"18.48.39",
3232
"18.49.37",
3333
"19.01.34",
34-
"19.02.34"
34+
"19.02.39",
35+
"19.03.35"
3536
]
3637
)
3738
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c
3434
"18.48.39",
3535
"18.49.37",
3636
"19.01.34",
37-
"19.02.34"
37+
"19.02.39",
38+
"19.03.35"
3839
]
3940
)
4041
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
3131
"18.48.39",
3232
"18.49.37",
3333
"19.01.34",
34-
"19.02.34"
34+
"19.02.39",
35+
"19.03.35"
3536
]
3637
)
3738
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
2727
"18.48.39",
2828
"18.49.37",
2929
"19.01.34",
30-
"19.02.34"
30+
"19.02.39",
31+
"19.03.35"
3132
]
3233
)
3334
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
2727
"18.48.39",
2828
"18.49.37",
2929
"19.01.34",
30-
"19.02.34"
30+
"19.02.39",
31+
"19.03.35"
3132
]
3233
)
3334
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
4141
"18.48.39",
4242
"18.49.37",
4343
"19.01.34",
44-
"19.02.34"
44+
"19.02.39",
45+
"19.03.35"
4546
]
4647
)
4748
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
3838
"18.48.39",
3939
"18.49.37",
4040
"19.01.34",
41-
"19.02.34"
41+
"19.02.39",
42+
"19.03.35"
4243
]
4344
)
4445
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
2727
"18.48.39",
2828
"18.49.37",
2929
"19.01.34",
30-
"19.02.34"
30+
"19.02.39",
31+
"19.03.35"
3132
]
3233
)
3334
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/HideEmailAddressPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
2727
"18.48.39",
2828
"18.49.37",
2929
"19.01.34",
30-
"19.02.34"
30+
"19.02.39",
31+
"19.03.35"
3132
]
3233
)
3334
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
3131
"18.48.39",
3232
"18.49.37",
3333
"19.01.34",
34-
"19.02.34"
34+
"19.02.39",
35+
"19.03.35"
3536
]
3637
)
3738
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
2929
"18.48.39",
3030
"18.49.37",
3131
"19.01.34",
32-
"19.02.34"
32+
"19.02.39",
33+
"19.03.35"
3334
]
3435
)
3536
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ import app.revanced.patches.youtube.shared.fingerprints.SeekbarOnDrawFingerprint
3535
"18.48.39",
3636
"18.49.37",
3737
"19.01.34",
38-
"19.02.34"
38+
"19.02.39",
39+
"19.03.35"
3940
]
4041
)
4142
]

src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt

+5-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
3939
"18.48.39",
4040
"18.49.37",
4141
"19.01.34",
42-
"19.02.34"
42+
"19.02.39",
43+
"19.03.35"
4344
]
4445
)
4546
]
@@ -59,6 +60,8 @@ object HideShortsComponentsPatch : BytecodePatch(
5960
override fun execute(context: BytecodeContext) {
6061
// region Hide the Shorts shelf.
6162

63+
// This patch point is not present in 19.03.x and greater.
64+
// If 19.02.x and lower is dropped, then this section of code and the fingerprint should be removed.
6265
ReelConstructorFingerprint.result?.let {
6366
it.mutableMethod.apply {
6467
val insertIndex = it.scanResult.patternScanResult!!.startIndex + 2
@@ -71,7 +74,7 @@ object HideShortsComponentsPatch : BytecodePatch(
7174
"hideShortsShelf"
7275
)
7376
}
74-
} ?: throw ReelConstructorFingerprint.exception
77+
} // Do not throw an exception if not resolved.
7578

7679
// endregion
7780

src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt

+9-3
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,15 @@ object HideShortsComponentsResourcePatch : ResourcePatch() {
9797
)
9898
)
9999

100-
fun String.getId() = ResourceMappingPatch.resourceMappings.single { it.name == this }.id
100+
ResourceMappingPatch.resourceMappings.find {
101+
it.type == "layout" && it.name == "reel_multiple_items_shelf"
102+
}?.also {
103+
reelMultipleItemShelfId = it.id
104+
}
101105

102-
reelMultipleItemShelfId = "reel_multiple_items_shelf".getId()
103-
reelPlayerRightCellButtonHeight = "reel_player_right_cell_button_height".getId()
106+
reelPlayerRightCellButtonHeight =
107+
ResourceMappingPatch.resourceMappings.single {
108+
it.type == "dimen" && it.name == "reel_player_right_cell_button_height"
109+
}.id
104110
}
105111
}
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
package app.revanced.patches.youtube.layout.hide.shorts.fingerprints
22

33
import app.revanced.patcher.extensions.or
4+
import app.revanced.patcher.fingerprint.MethodFingerprint
45
import app.revanced.patches.youtube.layout.hide.shorts.HideShortsComponentsResourcePatch
5-
import app.revanced.util.patch.LiteralValueFingerprint
6+
import app.revanced.util.containsWideLiteralInstructionValue
67
import com.android.tools.smali.dexlib2.AccessFlags
78
import com.android.tools.smali.dexlib2.Opcode
89

9-
internal object ReelConstructorFingerprint : LiteralValueFingerprint(
10+
internal object ReelConstructorFingerprint : MethodFingerprint(
1011
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
1112
opcodes = listOf(Opcode.INVOKE_VIRTUAL),
12-
literalSupplier = { HideShortsComponentsResourcePatch.reelMultipleItemShelfId }
13+
customFingerprint = { methodDef, _ ->
14+
// Cannot use LiteralValueFingerprint, because the resource id may not be present.
15+
val reelMultipleItemShelfId = HideShortsComponentsResourcePatch.reelMultipleItemShelfId
16+
reelMultipleItemShelfId != -1L
17+
&& methodDef.containsWideLiteralInstructionValue(reelMultipleItemShelfId)
18+
}
1319
)

src/main/kotlin/app/revanced/patches/youtube/layout/hide/suggestedvideoendscreen/DisableSuggestedVideoEndScreenPatch.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
2626
"18.48.39",
2727
"18.49.37",
2828
"19.01.34",
29-
"19.02.34"
29+
"19.02.39",
30+
"19.03.35"
3031
]
3132
)
3233
]

0 commit comments

Comments
 (0)