diff --git a/src/main/kotlin/app/revanced/patches/music/general/spoofappversion/SpoofAppVersionPatch.kt b/src/main/kotlin/app/revanced/patches/music/general/spoofappversion/SpoofAppVersionPatch.kt
index f179b4c43..b3a40403d 100644
--- a/src/main/kotlin/app/revanced/patches/music/general/spoofappversion/SpoofAppVersionPatch.kt
+++ b/src/main/kotlin/app/revanced/patches/music/general/spoofappversion/SpoofAppVersionPatch.kt
@@ -5,6 +5,7 @@ import app.revanced.patches.music.general.oldstylelibraryshelf.OldStyleLibrarySh
import app.revanced.patches.music.utils.compatibility.Constants.COMPATIBLE_PACKAGE
import app.revanced.patches.music.utils.settings.CategoryType
import app.revanced.patches.music.utils.settings.SettingsPatch
+import app.revanced.util.appendAppVersion
import app.revanced.util.patch.BaseResourcePatch
@Suppress("unused")
@@ -21,6 +22,10 @@ object SpoofAppVersionPatch : BaseResourcePatch(
) {
override fun execute(context: ResourceContext) {
+ if (SettingsPatch.upward0718) {
+ context.appendAppVersion("7.16.53")
+ }
+
SettingsPatch.addSwitchPreference(
CategoryType.GENERAL,
"revanced_spoof_app_version",
diff --git a/src/main/kotlin/app/revanced/patches/youtube/general/spoofappversion/SpoofAppVersionPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/general/spoofappversion/SpoofAppVersionPatch.kt
index 54a4a0b0a..df15871e7 100644
--- a/src/main/kotlin/app/revanced/patches/youtube/general/spoofappversion/SpoofAppVersionPatch.kt
+++ b/src/main/kotlin/app/revanced/patches/youtube/general/spoofappversion/SpoofAppVersionPatch.kt
@@ -2,8 +2,8 @@ package app.revanced.patches.youtube.general.spoofappversion
import app.revanced.patcher.data.ResourceContext
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
-import app.revanced.patches.youtube.utils.settings.ResourceUtils.addEntryValues
import app.revanced.patches.youtube.utils.settings.SettingsPatch
+import app.revanced.util.appendAppVersion
import app.revanced.util.patch.BaseResourcePatch
@Suppress("unused")
@@ -17,12 +17,6 @@ object SpoofAppVersionPatch : BaseResourcePatch(
),
compatiblePackages = COMPATIBLE_PACKAGE
) {
- private const val ATTRIBUTE_NAME_ENTRIES =
- "revanced_spoof_app_version_target_entries"
-
- private const val ATTRIBUTE_NAME_ENTRY_VALUE =
- "revanced_spoof_app_version_target_entry_values"
-
override fun execute(context: ResourceContext) {
if (SettingsPatch.upward1834) {
@@ -48,17 +42,4 @@ object SpoofAppVersionPatch : BaseResourcePatch(
SettingsPatch.updatePatchStatus(this)
}
-
- private fun ResourceContext.appendAppVersion(appVersion: String) {
- addEntryValues(
- ATTRIBUTE_NAME_ENTRIES,
- "@string/revanced_spoof_app_version_target_entry_" + appVersion.replace(".", "_"),
- prepend = false
- )
- addEntryValues(
- ATTRIBUTE_NAME_ENTRY_VALUE,
- appVersion,
- prepend = false
- )
- }
}
\ No newline at end of file
diff --git a/src/main/kotlin/app/revanced/util/ResourceUtils.kt b/src/main/kotlin/app/revanced/util/ResourceUtils.kt
index 226a271e7..f82f8c1a5 100644
--- a/src/main/kotlin/app/revanced/util/ResourceUtils.kt
+++ b/src/main/kotlin/app/revanced/util/ResourceUtils.kt
@@ -258,7 +258,10 @@ internal fun NodeList.findElementByAttributeValue(attributeName: String, value:
return null
}
-internal fun NodeList.findElementByAttributeValueOrThrow(attributeName: String, value: String): Element {
+internal fun NodeList.findElementByAttributeValueOrThrow(
+ attributeName: String,
+ value: String
+): Element {
return findElementByAttributeValue(attributeName, value)
?: throw PatchException("Could not find: $attributeName $value")
}
\ No newline at end of file
diff --git a/src/main/resources/music/settings/host/values/arrays.xml b/src/main/resources/music/settings/host/values/arrays.xml
index 6c3e25d26..525a55888 100644
--- a/src/main/resources/music/settings/host/values/arrays.xml
+++ b/src/main/resources/music/settings/host/values/arrays.xml
@@ -7,7 +7,7 @@
- @string/revanced_change_start_page_entry_library
- @string/revanced_change_start_page_entry_subscription
-
+
- FEmusic_charts
- FEmusic_explore
- FEmusic_home
@@ -41,7 +41,7 @@
- @string/revanced_spoof_app_version_target_entry_6_11_52
- @string/revanced_spoof_app_version_target_entry_4_27_53
-
+
- 6.11.52
- 4.27.53
diff --git a/src/main/resources/music/settings/host/values/strings.xml b/src/main/resources/music/settings/host/values/strings.xml
index 0e9c15303..38a74ab17 100644
--- a/src/main/resources/music/settings/host/values/strings.xml
+++ b/src/main/resources/music/settings/host/values/strings.xml
@@ -194,6 +194,7 @@ This does not bypass the age restriction. It just accepts it automatically."Select the spoof app version target.
4.27.53 - Disable Radio mode in Canadian regions
6.11.52 - Disable real-time lyrics
+ 7.16.53 - Restore old action bar