mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-06-12 05:07:45 +02:00
fix(YouTube - Spoof app version): Remove broken spoof targets when patching 19.25+ (#3915)
This commit is contained in:

committed by
GitHub

parent
31af587943
commit
9e18ecab18
@ -8,6 +8,8 @@ import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||
import app.revanced.patches.shared.misc.settings.preference.ListPreference
|
||||
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
||||
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.patches.youtube.misc.playservice.is_19_17_or_greater
|
||||
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@ -19,12 +21,14 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
|
||||
val spoofAppVersionPatch = bytecodePatch(
|
||||
name = "Spoof app version",
|
||||
description = "Adds an option to trick YouTube into thinking you are running an older version of the app. " +
|
||||
"This can be used to restore old UI elements and features.",
|
||||
"This can be used to restore old UI elements and features. " +
|
||||
"Patching 19.16.39 or lower includes additional older spoofing targets.",
|
||||
) {
|
||||
dependsOn(
|
||||
sharedExtensionPatch,
|
||||
settingsPatch,
|
||||
addResourcesPatch,
|
||||
versionCheckPatch
|
||||
)
|
||||
|
||||
compatibleWith(
|
||||
@ -43,10 +47,19 @@ val spoofAppVersionPatch = bytecodePatch(
|
||||
|
||||
PreferenceScreen.GENERAL_LAYOUT.addPreferences(
|
||||
SwitchPreference("revanced_spoof_app_version"),
|
||||
ListPreference(
|
||||
key = "revanced_spoof_app_version_target",
|
||||
summaryKey = null,
|
||||
),
|
||||
if (is_19_17_or_greater) {
|
||||
ListPreference(
|
||||
key = "revanced_spoof_app_version_target",
|
||||
summaryKey = null,
|
||||
)
|
||||
} else {
|
||||
ListPreference(
|
||||
key = "revanced_spoof_app_version_target",
|
||||
summaryKey = null,
|
||||
entriesKey = "revanced_spoof_app_version_target_legacy_entries",
|
||||
entryValuesKey = "revanced_spoof_app_version_target_legacy_entry_values"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
val insertIndex = spoofAppVersionFingerprint.patternMatch!!.startIndex + 1
|
||||
|
@ -9,7 +9,7 @@ import app.revanced.patches.youtube.video.speed.remember.rememberPlaybackSpeedPa
|
||||
val playbackSpeedPatch = bytecodePatch(
|
||||
name = "Playback speed",
|
||||
description = "Adds options to customize available playback speeds, remember the last playback speed selected " +
|
||||
"and show a speed dialog button to the video player.",
|
||||
"and show a speed dialog button in the video player.",
|
||||
) {
|
||||
dependsOn(
|
||||
playbackSpeedButtonPatch,
|
||||
|
@ -15,11 +15,17 @@
|
||||
<patch id="layout.spoofappversion.spoofAppVersionPatch">
|
||||
<string-array name="revanced_spoof_app_version_target_entries">
|
||||
<item>@string/revanced_spoof_app_version_target_entry_1</item>
|
||||
<item>@string/revanced_spoof_app_version_target_entry_2</item>
|
||||
<item>@string/revanced_spoof_app_version_target_entry_3</item>
|
||||
<item>@string/revanced_spoof_app_version_target_entry_4</item>
|
||||
</string-array>
|
||||
<string-array name="revanced_spoof_app_version_target_entry_values">
|
||||
<item>18.38.44</item>
|
||||
</string-array>
|
||||
<string-array name="revanced_spoof_app_version_target_legacy_entries">
|
||||
<item>@string/revanced_spoof_app_version_target_legacy_entry_1</item>
|
||||
<item>@string/revanced_spoof_app_version_target_legacy_entry_2</item>
|
||||
<item>@string/revanced_spoof_app_version_target_legacy_entry_3</item>
|
||||
<item>@string/revanced_spoof_app_version_target_legacy_entry_4</item>
|
||||
</string-array>
|
||||
<string-array name="revanced_spoof_app_version_target_legacy_entry_values">
|
||||
<item>18.33.40</item>
|
||||
<item>18.20.39</item>
|
||||
<item>18.09.39</item>
|
||||
|
@ -973,11 +973,12 @@ This is because Crowdin requires temporarily flattening this file and removing t
|
||||
<!-- It is ideal, but not required, if the text here appears is alphabetically after the text used for 'revanced_spoof_app_version_title'.
|
||||
This is because the 'General layout' menu uses alphabetic sorting, and it functionally works better if the spoof target selector appears below the 'Spoof app version' UI switch -->
|
||||
<string name="revanced_spoof_app_version_target_title">Spoof app version target</string>
|
||||
<string name="revanced_spoof_app_version_target_entry_1">18.38.44 - Restore old Shorts player icons</string>
|
||||
<!-- 'RYD' is 'Return YouTube Dislike' -->
|
||||
<string name="revanced_spoof_app_version_target_entry_1">18.33.40 - Restore RYD on Shorts incognito mode</string>
|
||||
<string name="revanced_spoof_app_version_target_entry_2">18.20.39 - Restore wide video speed & quality menu</string>
|
||||
<string name="revanced_spoof_app_version_target_entry_3">18.09.39 - Restore library tab</string>
|
||||
<string name="revanced_spoof_app_version_target_entry_4">17.41.37 - Restore old playlist shelf</string>
|
||||
<string name="revanced_spoof_app_version_target_legacy_entry_1">18.33.40 - Restore RYD on Shorts incognito mode</string>
|
||||
<string name="revanced_spoof_app_version_target_legacy_entry_2">18.20.39 - Restore wide video speed & quality menu</string>
|
||||
<string name="revanced_spoof_app_version_target_legacy_entry_3">18.09.39 - Restore library tab</string>
|
||||
<string name="revanced_spoof_app_version_target_legacy_entry_4">17.41.37 - Restore old playlist shelf</string>
|
||||
</patch>
|
||||
<patch id="layout.startpage.changeStartPagePatch">
|
||||
<string name="revanced_change_start_page_title">Set start page</string>
|
||||
|
Reference in New Issue
Block a user