Skip to content

Commit 6c25c95

Browse files
author
LisoUseInAIKyrios
authored
feat(YouTube Music): Support version 7.03 (#3272)
1 parent ad07efb commit 6c25c95

File tree

12 files changed

+139
-19
lines changed

12 files changed

+139
-19
lines changed

src/main/kotlin/app/revanced/patches/music/ad/video/HideMusicVideoAds.kt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,18 @@ import app.revanced.util.exception
1111

1212
@Patch(
1313
name = "Hide music video ads",
14-
compatiblePackages = [CompatiblePackage("com.google.android.apps.youtube.music")],
14+
compatiblePackages = [
15+
CompatiblePackage(
16+
"com.google.android.apps.youtube.music",
17+
[
18+
"6.45.54",
19+
"6.51.53",
20+
"7.01.53",
21+
"7.02.52",
22+
"7.03.52",
23+
]
24+
)
25+
],
1526
)
1627
@Suppress("unused")
1728
object HideMusicVideoAds : BytecodePatch(

src/main/kotlin/app/revanced/patches/music/audio/codecs/CodecsUnlockPatch.kt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,18 @@ import com.android.tools.smali.dexlib2.Opcode
1111

1212
@Patch(
1313
description = "Adds more audio codec options. The new audio codecs usually result in better audio quality.",
14-
compatiblePackages = [CompatiblePackage("com.google.android.apps.youtube.music")],
14+
compatiblePackages = [
15+
CompatiblePackage(
16+
"com.google.android.apps.youtube.music",
17+
[
18+
"6.45.54",
19+
"6.51.53",
20+
"7.01.53",
21+
"7.02.52",
22+
"7.03.52",
23+
]
24+
)
25+
]
1526
)
1627
@Deprecated("This patch is no longer needed as the feature is now enabled by default.")
1728
object CodecsUnlockPatch : BytecodePatch(

src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/EnableExclusiveAudioPlayback.kt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,18 @@ import app.revanced.util.exception
1111
@Patch(
1212
name = "Enable exclusive audio playback",
1313
description = "Enables the option to play audio without video.",
14-
compatiblePackages = [CompatiblePackage("com.google.android.apps.youtube.music")],
14+
compatiblePackages = [
15+
CompatiblePackage(
16+
"com.google.android.apps.youtube.music",
17+
[
18+
"6.45.54",
19+
"6.51.53",
20+
"7.01.53",
21+
"7.02.52",
22+
"7.03.52",
23+
]
24+
)
25+
]
1526
)
1627
@Suppress("unused")
1728
object EnableExclusiveAudioPlayback : BytecodePatch(

src/main/kotlin/app/revanced/patches/music/interaction/permanentrepeat/PermanentRepeatPatch.kt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,18 @@ import app.revanced.patches.music.interaction.permanentrepeat.fingerprints.Repea
1313
@Patch(
1414
name = "Permanent repeat",
1515
description = "Permanently remember your repeating preference even if the playlist ends or another track is played.",
16-
compatiblePackages = [CompatiblePackage("com.google.android.apps.youtube.music")],
16+
compatiblePackages = [
17+
CompatiblePackage(
18+
"com.google.android.apps.youtube.music",
19+
[
20+
"6.45.54",
21+
"6.51.53",
22+
"7.01.53",
23+
"7.02.52",
24+
"7.03.52",
25+
]
26+
)
27+
],
1728
use = false
1829
)
1930
@Suppress("unused")
@@ -23,7 +34,7 @@ object PermanentRepeatPatch : BytecodePatch(
2334
override fun execute(context: BytecodeContext) {
2435
RepeatTrackFingerprint.result?.let {
2536
val startIndex = it.scanResult.patternScanResult!!.endIndex
26-
val repeatIndex = startIndex + 3
37+
val repeatIndex = startIndex + 1
2738

2839
it.mutableMethod.apply {
2940
addInstructionsWithLabels(

src/main/kotlin/app/revanced/patches/music/interaction/permanentrepeat/fingerprints/RepeatTrackFingerprint.kt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@ import com.android.tools.smali.dexlib2.AccessFlags
66
import com.android.tools.smali.dexlib2.Opcode
77

88
internal object RepeatTrackFingerprint : MethodFingerprint(
9-
"V",
10-
AccessFlags.PUBLIC or AccessFlags.FINAL,
11-
listOf("L", "L"),
12-
listOf(
13-
Opcode.CHECK_CAST,
14-
Opcode.INVOKE_INTERFACE,
9+
returnType = "V",
10+
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
11+
parameters = listOf("L", "L"),
12+
opcodes = listOf(
1513
Opcode.IGET_OBJECT,
1614
Opcode.IGET_OBJECT,
1715
Opcode.SGET_OBJECT,
1816
Opcode.INVOKE_VIRTUAL,
1917
Opcode.MOVE_RESULT,
2018
Opcode.IF_NEZ
21-
)
19+
),
20+
strings = listOf("w_st")
2221
)

src/main/kotlin/app/revanced/patches/music/interaction/permanentshuffle/PermanentShufflePatch.kt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,18 @@ import app.revanced.util.exception
1212
name = "Permanent shuffle",
1313
description = "Permanently remember your shuffle preference " +
1414
"even if the playlist ends or another track is played.",
15-
compatiblePackages = [CompatiblePackage("com.google.android.apps.youtube.music")],
15+
compatiblePackages = [
16+
CompatiblePackage(
17+
"com.google.android.apps.youtube.music",
18+
[
19+
"6.45.54",
20+
"6.51.53",
21+
"7.01.53",
22+
"7.02.52",
23+
"7.03.52",
24+
]
25+
)
26+
],
1627
use = false,
1728
)
1829
@Suppress("unused")

src/main/kotlin/app/revanced/patches/music/layout/compactheader/HideCategoryBar.kt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,18 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
1313
@Patch(
1414
name = "Hide category bar",
1515
description = "Hides the category bar at the top of the homepage.",
16-
compatiblePackages = [CompatiblePackage("com.google.android.apps.youtube.music")],
16+
compatiblePackages = [
17+
CompatiblePackage(
18+
"com.google.android.apps.youtube.music",
19+
[
20+
"6.45.54",
21+
"6.51.53",
22+
"7.01.53",
23+
"7.02.52",
24+
"7.03.52",
25+
]
26+
)
27+
],
1728
use = false,
1829
)
1930
@Suppress("unused")

src/main/kotlin/app/revanced/patches/music/layout/minimizedplayback/MinimizedPlaybackPatch.kt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,18 @@ import app.revanced.util.exception
1313
@Patch(
1414
name = "Minimized playback",
1515
description = "Unlocks options for picture-in-picture and background playback.",
16-
compatiblePackages = [CompatiblePackage("com.google.android.apps.youtube.music")],
16+
compatiblePackages = [
17+
CompatiblePackage(
18+
"com.google.android.apps.youtube.music",
19+
[
20+
"6.45.54",
21+
"6.51.53",
22+
"7.01.53",
23+
"7.02.52",
24+
"7.03.52",
25+
]
26+
)
27+
]
1728
)
1829
@Suppress("unused")
1930
object MinimizedPlaybackPatch : BytecodePatch(

src/main/kotlin/app/revanced/patches/music/layout/premium/HideGetPremiumPatch.kt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,18 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
1616
@Patch(
1717
name = "Hide 'Get Music Premium' label",
1818
description = "Hides the \"Get Music Premium\" label from the account menu and settings.",
19-
compatiblePackages = [CompatiblePackage("com.google.android.apps.youtube.music")],
19+
compatiblePackages = [
20+
CompatiblePackage(
21+
"com.google.android.apps.youtube.music",
22+
[
23+
"6.45.54",
24+
"6.51.53",
25+
"7.01.53",
26+
"7.02.52",
27+
"7.03.52",
28+
]
29+
)
30+
]
2031
)
2132
@Suppress("unused")
2233
object HideGetPremiumPatch : BytecodePatch(

src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/RemoveUpgradeButtonPatch.kt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,18 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
2222
@Patch(
2323
name = "Remove upgrade button",
2424
description = "Removes the upgrade tab from the pivot bar.",
25-
compatiblePackages = [CompatiblePackage("com.google.android.apps.youtube.music")],
25+
compatiblePackages = [
26+
CompatiblePackage(
27+
"com.google.android.apps.youtube.music",
28+
[
29+
"6.45.54",
30+
"6.51.53",
31+
"7.01.53",
32+
"7.02.52",
33+
"7.03.52",
34+
]
35+
)
36+
]
2637
)
2738
@Suppress("unused")
2839
object RemoveUpgradeButtonPatch : BytecodePatch(

0 commit comments

Comments
 (0)