feat(YT Music): Support latest versions (#5524)

This commit is contained in:
netceil
2025-07-26 08:27:47 +02:00
committed by GitHub
parent a8eee825e6
commit 125855540b
10 changed files with 11 additions and 65 deletions

View File

@@ -8,12 +8,7 @@ val hideVideoAdsPatch = bytecodePatch(
name = "Hide music video ads",
description = "Hides ads that appear while listening to or streaming music videos, podcasts, or songs.",
) {
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.51"
)
)
compatibleWith("com.google.android.apps.youtube.music")
execute {
navigate(showVideoAdsParentFingerprint.originalMethod)

View File

@@ -8,12 +8,7 @@ val enableExclusiveAudioPlaybackPatch = bytecodePatch(
name = "Enable exclusive audio playback",
description = "Enables the option to play audio without video.",
) {
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.51"
)
)
compatibleWith("com.google.android.apps.youtube.music")
execute {
allowExclusiveAudioPlaybackFingerprint.method.returnEarly(true)

View File

@@ -11,12 +11,7 @@ val permanentRepeatPatch = bytecodePatch(
description = "Permanently remember your repeating preference even if the playlist ends or another track is played.",
use = false,
) {
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.51"
)
)
compatibleWith("com.google.android.apps.youtube.music")
execute {
val startIndex = repeatTrackFingerprint.patternMatch!!.endIndex

View File

@@ -7,18 +7,9 @@ import app.revanced.patcher.patch.bytecodePatch
@Suppress("unused")
val permanentShufflePatch = bytecodePatch(
description = "Permanently remember your shuffle preference " +
"even if the playlist ends or another track is played.",
use = false,
"even if the playlist ends or another track is played."
) {
compatibleWith(
"com.google.android.apps.youtube.music"(
"6.45.54",
"6.51.53",
"7.01.53",
"7.02.52",
"7.03.52",
),
)
compatibleWith("com.google.android.apps.youtube.music")
execute {
disableShuffleFingerprint.method.addInstruction(0, "return-void")

View File

@@ -11,12 +11,7 @@ val hideCategoryBar = bytecodePatch(
description = "Hides the category bar at the top of the homepage.",
use = false,
) {
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.51"
)
)
compatibleWith("com.google.android.apps.youtube.music")
execute {
constructCategoryBarFingerprint.method.apply {

View File

@@ -11,12 +11,7 @@ val hideGetPremiumPatch = bytecodePatch(
name = "Hide 'Get Music Premium' label",
description = "Hides the \"Get Music Premium\" label from the account menu and settings.",
) {
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.51"
)
)
compatibleWith("com.google.android.apps.youtube.music")
execute {
hideGetPremiumFingerprint.method.apply {

View File

@@ -18,12 +18,7 @@ val removeUpgradeButtonPatch = bytecodePatch(
name = "Remove upgrade button",
description = "Removes the upgrade tab from the pivot bar.",
) {
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.51"
)
)
compatibleWith("com.google.android.apps.youtube.music")
execute {
pivotBarConstructorFingerprint.method.apply {

View File

@@ -8,12 +8,7 @@ val bypassCertificateChecksPatch = bytecodePatch(
name = "Bypass certificate checks",
description = "Bypasses certificate checks which prevent YouTube Music from working on Android Auto.",
) {
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.51"
)
)
compatibleWith("com.google.android.apps.youtube.music")
execute {
checkCertificateFingerprint.method.returnEarly(true)

View File

@@ -8,12 +8,7 @@ val backgroundPlaybackPatch = bytecodePatch(
name = "Remove background playback restrictions",
description = "Removes restrictions on background playback, including playing kids videos in the background.",
) {
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.51"
)
)
compatibleWith("com.google.android.apps.youtube.music")
execute {
kidsBackgroundPlaybackPolicyControllerFingerprint.method.addInstruction(

View File

@@ -25,12 +25,7 @@ val spoofClientPatch = bytecodePatch(
name = "Spoof client",
description = "Spoofs the client to fix playback.",
) {
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.51"
)
)
compatibleWith("com.google.android.apps.youtube.music")
dependsOn(
sharedExtensionPatch,