From c1d8dc40f424f6957b2b10f03244744e00226f05 Mon Sep 17 00:00:00 2001 From: inotia00 <108592928+inotia00@users.noreply.github.com> Date: Wed, 18 Oct 2023 10:18:11 +0900 Subject: [PATCH] fix(YouTube/Settings): header for `Experimental Flags` is added even though `Experimental Flags` is empty --- .../youtube/misc/codec/audio/ForceOpusCodecPatch.kt | 1 + .../youtube/misc/codec/video/ForceVideoCodecPatch.kt | 1 + .../youtube/misc/layoutswitch/LayoutSwitchPatch.kt | 1 + .../patches/youtube/misc/quic/QUICProtocolPatch.kt | 1 + .../misc/spoofappversion/SpoofAppVersionPatch.kt | 1 + .../utils/fix/parameter/SpoofPlayerParameterPatch.kt | 1 + .../resources/youtube/settings/xml/revanced_prefs.xml | 10 +++++----- 7 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/codec/audio/ForceOpusCodecPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/codec/audio/ForceOpusCodecPatch.kt index 0110740a4..369c97fe0 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/codec/audio/ForceOpusCodecPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/codec/audio/ForceOpusCodecPatch.kt @@ -43,6 +43,7 @@ object ForceOpusCodecPatch : AbstractOpusCodecsPatch( */ SettingsPatch.addPreference( arrayOf( + "SETTINGS: EXPERIMENTAL_FLAGS", "SETTINGS: ENABLE_OPUS_CODEC" ) ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/codec/video/ForceVideoCodecPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/codec/video/ForceVideoCodecPatch.kt index e384b1886..56fd53ef1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/codec/video/ForceVideoCodecPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/codec/video/ForceVideoCodecPatch.kt @@ -117,6 +117,7 @@ object ForceVideoCodecPatch : BytecodePatch( */ SettingsPatch.addPreference( arrayOf( + "SETTINGS: EXPERIMENTAL_FLAGS", "SETTINGS: ENABLE_VIDEO_CODEC" ) ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/layoutswitch/LayoutSwitchPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/layoutswitch/LayoutSwitchPatch.kt index 3434ac869..b789d11a9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/layoutswitch/LayoutSwitchPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/layoutswitch/LayoutSwitchPatch.kt @@ -101,6 +101,7 @@ object LayoutSwitchPatch : BytecodePatch( */ SettingsPatch.addPreference( arrayOf( + "SETTINGS: EXPERIMENTAL_FLAGS", "SETTINGS: LAYOUT_SWITCH" ) ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/quic/QUICProtocolPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/quic/QUICProtocolPatch.kt index 6edc5e6aa..450bf070c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/quic/QUICProtocolPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/quic/QUICProtocolPatch.kt @@ -61,6 +61,7 @@ object QUICProtocolPatch : BytecodePatch( */ SettingsPatch.addPreference( arrayOf( + "SETTINGS: EXPERIMENTAL_FLAGS", "SETTINGS: DISABLE_QUIC_PROTOCOL" ) ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/spoofappversion/SpoofAppVersionPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/spoofappversion/SpoofAppVersionPatch.kt index 53fdbb43e..2982e2e53 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/spoofappversion/SpoofAppVersionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/spoofappversion/SpoofAppVersionPatch.kt @@ -50,6 +50,7 @@ object SpoofAppVersionPatch : AbstractVersionSpoofPatch( */ SettingsPatch.addPreference( arrayOf( + "SETTINGS: EXPERIMENTAL_FLAGS", "SETTINGS: SPOOF_APP_VERSION" ) ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/utils/fix/parameter/SpoofPlayerParameterPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/utils/fix/parameter/SpoofPlayerParameterPatch.kt index cdd08f242..b15bf126f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/utils/fix/parameter/SpoofPlayerParameterPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/utils/fix/parameter/SpoofPlayerParameterPatch.kt @@ -190,6 +190,7 @@ object SpoofPlayerParameterPatch : BytecodePatch( */ SettingsPatch.addPreference( arrayOf( + "SETTINGS: EXPERIMENTAL_FLAGS", "SETTINGS: SPOOF_PLAYER_PARAMETER" ) ) diff --git a/src/main/resources/youtube/settings/xml/revanced_prefs.xml b/src/main/resources/youtube/settings/xml/revanced_prefs.xml index 703cd05ff..9fe70e392 100644 --- a/src/main/resources/youtube/settings/xml/revanced_prefs.xml +++ b/src/main/resources/youtube/settings/xml/revanced_prefs.xml @@ -280,7 +280,9 @@ PREFERENCE: MICROG_SETTINGS --> - + + @@ -288,9 +290,7 @@ SETTINGS: ENABLE_OPUS_CODEC --> - -