From 5f3a71ecc0ba7ae3ba39254ee11f04667d311209 Mon Sep 17 00:00:00 2001 From: inotia00 <108592928+inotia00@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:35:29 +0900 Subject: [PATCH] feat(YouTube - Spoof app version): Add target version `19.26.42 - Disable Cairo icon in navigation and toolbar` and `19.33.37 - Restore old playback speed flyout panel` --- .../spoofappversion/SpoofAppVersionPatch.kt | 45 +++++++++++++------ .../youtube/settings/host/values/arrays.xml | 6 --- .../youtube/settings/host/values/strings.xml | 2 + 3 files changed, 34 insertions(+), 19 deletions(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/general/spoofappversion/SpoofAppVersionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/general/spoofappversion/SpoofAppVersionPatch.kt index fff7be0aa..fd9711fde 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/general/spoofappversion/SpoofAppVersionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/general/spoofappversion/SpoofAppVersionPatch.kt @@ -13,7 +13,10 @@ import app.revanced.patches.youtube.utils.patch.PatchList.SPOOF_APP_VERSION import app.revanced.patches.youtube.utils.playservice.is_18_34_or_greater import app.revanced.patches.youtube.utils.playservice.is_18_39_or_greater import app.revanced.patches.youtube.utils.playservice.is_18_49_or_greater +import app.revanced.patches.youtube.utils.playservice.is_19_17_or_greater import app.revanced.patches.youtube.utils.playservice.is_19_23_or_greater +import app.revanced.patches.youtube.utils.playservice.is_19_28_or_greater +import app.revanced.patches.youtube.utils.playservice.is_19_34_or_greater import app.revanced.patches.youtube.utils.playservice.versionCheckPatch import app.revanced.patches.youtube.utils.settings.ResourceUtils.addPreference import app.revanced.patches.youtube.utils.settings.settingsPatch @@ -81,18 +84,6 @@ val spoofAppVersionPatch = resourcePatch( execute { - if (is_18_34_or_greater) { - appendAppVersion("18.33.40") - if (is_18_39_or_greater) { - appendAppVersion("18.38.45") - if (is_18_49_or_greater) { - appendAppVersion("18.48.39") - } - } - } - - // region add settings - addPreference( arrayOf( "PREFERENCE_SCREEN: GENERAL", @@ -102,7 +93,35 @@ val spoofAppVersionPatch = resourcePatch( SPOOF_APP_VERSION ) - // endregion + if (!is_19_17_or_greater) { + appendAppVersion("17.41.37") + appendAppVersion("18.05.40") + appendAppVersion("18.17.43") + if (!is_18_34_or_greater) { + return@execute + } + appendAppVersion("18.33.40") + } + + if (!is_18_39_or_greater) { + return@execute + } + appendAppVersion("18.38.45") + + if (!is_18_49_or_greater) { + return@execute + } + appendAppVersion("18.48.39") + + if (!is_19_28_or_greater) { + return@execute + } + appendAppVersion("19.26.42") + + if (!is_19_34_or_greater) { + return@execute + } + appendAppVersion("19.33.37") } } diff --git a/patches/src/main/resources/youtube/settings/host/values/arrays.xml b/patches/src/main/resources/youtube/settings/host/values/arrays.xml index f5b9235ed..d5f4ce10f 100644 --- a/patches/src/main/resources/youtube/settings/host/values/arrays.xml +++ b/patches/src/main/resources/youtube/settings/host/values/arrays.xml @@ -246,14 +246,8 @@ ANDROID_VR - @string/revanced_spoof_app_version_target_entry_18_17_43 - @string/revanced_spoof_app_version_target_entry_18_05_40 - @string/revanced_spoof_app_version_target_entry_17_41_37 - 18.17.43 - 18.05.40 - 17.41.37 YouTube Music diff --git a/patches/src/main/resources/youtube/settings/host/values/strings.xml b/patches/src/main/resources/youtube/settings/host/values/strings.xml index f1e7ccf01..08773d172 100644 --- a/patches/src/main/resources/youtube/settings/host/values/strings.xml +++ b/patches/src/main/resources/youtube/settings/host/values/strings.xml @@ -390,6 +390,8 @@ If later turned off, it is recommended to clear the app data to prevent UI bugs. 18.33.40 - Restore old Shorts action bar 18.38.45 - Restore old default video quality behavior 18.48.39 - Disable views and likes from being updated in real time + 19.26.42 - Disable Cairo icon in navigation and toolbar + 19.33.37 - Restore old playback speed flyout panel Account menu