From 49507936e97b4c78d88218b21add1210adf9c088 Mon Sep 17 00:00:00 2001
From: inotia00 <108592928+inotia00@users.noreply.github.com>
Date: Wed, 27 Mar 2024 16:33:57 +0900
Subject: [PATCH] feat(YouTube Music/Hide general ads): add `Hide paid
promotion banner` settings
---
.../revanced/patches/music/ads/general/GeneralAdsPatch.kt | 7 ++++++-
src/main/resources/music/settings/host/values/strings.xml | 2 ++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/main/kotlin/app/revanced/patches/music/ads/general/GeneralAdsPatch.kt b/src/main/kotlin/app/revanced/patches/music/ads/general/GeneralAdsPatch.kt
index 125e99fd8..4abc9466c 100644
--- a/src/main/kotlin/app/revanced/patches/music/ads/general/GeneralAdsPatch.kt
+++ b/src/main/kotlin/app/revanced/patches/music/ads/general/GeneralAdsPatch.kt
@@ -102,7 +102,7 @@ object GeneralAdsPatch : BytecodePatch(
ShowDialogCommandFingerprint.result?.let {
it.mutableMethod.apply {
// In this method, custom dialog is created and shown.
- // There were no issues despite adding ˇ°return-voidˇ± to the first index.
+ // There were no issues despite adding “return-void” to the first index.
//
// If an issue occurs due to patching due to server-side changes in the future,
// Find the instruction whose name is "show" in [MethodReference] and click the 'AlertDialog.BUTTON_POSITIVE' button.
@@ -197,6 +197,11 @@ object GeneralAdsPatch : BytecodePatch(
"revanced_hide_music_ads",
"true"
)
+ SettingsPatch.addMusicPreference(
+ CategoryType.ADS,
+ "revanced_hide_paid_promotion",
+ "true"
+ )
SettingsPatch.addMusicPreference(
CategoryType.ADS,
"revanced_hide_premium_promotion",
diff --git a/src/main/resources/music/settings/host/values/strings.xml b/src/main/resources/music/settings/host/values/strings.xml
index 0889fc2d5..3eb6286ee 100644
--- a/src/main/resources/music/settings/host/values/strings.xml
+++ b/src/main/resources/music/settings/host/values/strings.xml
@@ -176,6 +176,8 @@ Some features may not work properly in the old player layout."
Hide navigation label
Hides the \"New playlist\" button in the library.
Hide new playlist button
+ Hides paid promotion banner.
+ Hide paid promotion banner
Hides the playlist card from the homepage.
Hide playlist card
Hides premium promotion popups.