diff --git a/src/main/kotlin/app/revanced/util/resources/MusicResourceHelper.kt b/src/main/kotlin/app/revanced/util/resources/MusicResourceHelper.kt index dac1af0c9..97ddb28b3 100644 --- a/src/main/kotlin/app/revanced/util/resources/MusicResourceHelper.kt +++ b/src/main/kotlin/app/revanced/util/resources/MusicResourceHelper.kt @@ -111,29 +111,6 @@ internal object MusicResourceHelper { } } - internal fun ResourceContext.addMusicPreferenceAlt( - category: String, - key: String, - defaultValue: String, - dependencyKey: String - ) { - this.xmlEditor[YOUTUBE_MUSIC_SETTINGS_PATH].use { editor -> - val tags = editor.file.getElementsByTagName(YOUTUBE_MUSIC_CATEGORY_TAG_NAME) - List(tags.length) { tags.item(it) as Element } - .filter { it.getAttribute("android:key").contains("revanced_settings_$category") } - .forEach { - it.adoptChild(YOUTUBE_MUSIC_PREFERENCE_TAG_NAME) { - setAttribute("android:title", "@string/$key" + "_title") - setAttribute("android:summaryOn", "@string/$key" + "_summary_on") - setAttribute("android:summaryOff", "@string/$key" + "_summary_off") - setAttribute("android:key", key) - setAttribute("android:defaultValue", defaultValue) - setAttribute("android:dependency", dependencyKey) - } - } - } - } - internal fun ResourceContext.addMusicPreferenceWithIntent( category: String, key: String, diff --git a/src/main/kotlin/app/revanced/util/resources/ResourceHelper.kt b/src/main/kotlin/app/revanced/util/resources/ResourceHelper.kt index 710963ef3..99f6f04bd 100644 --- a/src/main/kotlin/app/revanced/util/resources/ResourceHelper.kt +++ b/src/main/kotlin/app/revanced/util/resources/ResourceHelper.kt @@ -50,33 +50,6 @@ internal object ResourceHelper { } } - internal fun ResourceContext.addEntries( - path: String, - speedEntries: String, - attributeName: String - ) { - xmlEditor[path].use { - with(it.file) { - val resourcesNode = getElementsByTagName("resources").item(0) as Element - - val newElement: Element = createElement("item") - - for (i in 0 until resourcesNode.childNodes.length) { - val node = resourcesNode.childNodes.item(i) as? Element ?: continue - - if (node.getAttribute("name") == attributeName) { - newElement.appendChild(createTextNode(speedEntries)) - - node.appendChild(newElement) - } - } - } - } - this[path].writeText( - this[path].readText().replace("1.0x", "@string/shorts_speed_control_normal_label") - ) - } - internal fun ResourceContext.addPreference(settingArray: Array) { val prefs = this[TARGET_PREFERENCE_PATH] diff --git a/src/main/resources/music/settings/host/values/strings.xml b/src/main/resources/music/settings/host/values/strings.xml index 08aefdc8e..05ace3f16 100644 --- a/src/main/resources/music/settings/host/values/strings.xml +++ b/src/main/resources/music/settings/host/values/strings.xml @@ -3,7 +3,7 @@ Ads Layout Miscellaneous - Package name of the downloader app such as NewPipe\'s or PowerTube\'s. + Package name of the downloader app such as NewPipe\'s or Seal\'s. Package name of downloader Disable forced captions from automatically enabling in video player. Disable auto captions @@ -14,16 +14,24 @@ Enable color match player Enable compact dialog on phone. Enable compact dialog + Add dismiss queue to flyout menu. (YT Music v6.04.51+) + Enable dismiss queue Keep player permanently minimized even if another track is played. Enable force minimized player Enable force shuffle even if another track is played. Enable force shuffle Enables entry into landscape mode by screen rotation on the phone. Enable landscape mode + Enable new player layouts. (YT Music v5.47.51+) + Enable new layout + Return the miniplayers to old style. (YT Music v5.55.53+) + Enable old style miniplayer Enable 250/251 opus codec when playing audio. Enable opus codec Save the video quality value whenever you change the video quality. Enable save video quality + Add sleep timer to flyout menu. + Enable sleep timer Adds a grey tint to the video player to reduce eye strain. Enable zen mode ReVanced Extended @@ -37,16 +45,16 @@ Hide category bar Hide ads before playing a track. Hide music ads + Hide labels in navigation bar. + Hide navigation bar labels Hide the New Playlist button in the Library tab. Hide new playlist button Hides the playlist card from homepage. Hide playlist card - Replace share button with external download button or sleep timer dialog. + Replace share button with external download button. Hook share button (Experimental Flags) - Open external downloader. - Open sleep timer dialog. - Hook type Refresh and restart + Reset Changing default mobile data quality to: Failed to set quality Changing default Wi-Fi quality to: diff --git a/src/main/resources/youtube/settings/host/values/strings.xml b/src/main/resources/youtube/settings/host/values/strings.xml index 32bfaf1c4..7ac6ea151 100644 --- a/src/main/resources/youtube/settings/host/values/strings.xml +++ b/src/main/resources/youtube/settings/host/values/strings.xml @@ -6,7 +6,7 @@ Enable cloud messaging settings to receive notifications Open MicroG Ads - Filter components by their name separated by a comma + Filter components by line-separated names Custom filter General ads are shown General ads are hidden @@ -36,6 +36,9 @@ Time Stamp copied to clipboard Type the hex code of the seekbar color Custom seekbar color value + Type the video speed to change when pressing and holding the player + Custom speed overlay value + Playing at %sx speed Add or change the video speeds available Custom video speeds To open RVX in an external browser, turn on \'Open supported links\' and enable supported web addresses @@ -58,6 +61,9 @@ Zoom haptic feedback is enabled Zoom haptic feedback is disabled Disable zoom haptic feedback + Auto HDR brightness is enabled + Auto HDR brightness is disabled + Disable auto HDR brightness HDR video is enabled HDR video is disabled Disable HDR video @@ -79,25 +85,30 @@ Always auto repeat is disabled Always auto repeat is enabled Always auto repeat + Compact controls overlay is disabled + Compact controls overlay is enabled + Enable compact controls overlay Custom seekbar color is disabled Custom seekbar color is enabled Enable custom seekbar color Custom video speed is disabled Custom video speed is enabled Enable custom video speed + Debug logs are disabled + Debug logs are enabled + Enable debug logging External browser is disabled External browser is enabled Enable external browser - "Spoofing the client version to the old version - -This will change the appearance of the app, but unknown side effects may occur -If later turned off, the old UI may remain until clear the app data" - Spoof app version - 17.41.37 - Playlists shelf in library tab follows old layout - 17.30.34 - Restore old UI layout - 17.06.35 - Enable sorting videos by oldest - 16.08.35 - Restore explore tab - Spoof app version target + New splash animation is disabled + New splash animation is enabled + Enable new splash animation + Only available on Android 12+ + New thumbnail preview is disabled + New thumbnail preview is enabled + Enable new thumbnail preview + Apply opus audio codec instead of mp4a audio codec + Enable opus codec New style quality settings are shown Old style quality settings are shown Enable old style quality layout @@ -107,6 +118,7 @@ If later turned off, the old UI may remain until clear the app data" Tricks the dpi to use some phone layouts Enable phone layout "Spoofs the protobuf to prevent playback issues + Known issues - End screen cards are always hidden - Offline downloads may not work (YouTube Premium users)" @@ -114,9 +126,9 @@ Known issues Press-to-swipe is disabled Press-to-swipe is enabled Enable press-to-swipe gesture - When entering fullscreen after restarting the app, the saved brightness value is not overwritten - When entering fullscreen after restarting the app, the saved brightness value is overwritten - Enable save brightness + Don\'t save and restore brightness when exiting or entering fullscreen + Save and restore brightness when exiting or entering fullscreen + Enable save and restore brightness Does not save video quality values even when changing video quality Save the video quality value whenever you change the video quality Enable save video quality @@ -129,9 +141,6 @@ Known issues Even if the brightness is set to 0 by swiping, auto brightness is not activated When brightness reaches 0 by swiping, auto brightness is activated Enable auto-brightness by swiping - When playing HDR videos, brightness values specified by YouTube are applied - When playing HDR video, swipe gesture brightness values are applied - Enable swipe gesture brightness values in HDR video Brightness swipe is disabled Brightness swipe is enabled Enable brightness gesture @@ -152,8 +161,8 @@ Known issues Append time stamp speed is disabled Append time stamp speed is enabled Enable time stamp speed - Spoof device information to enable VP9 codec - Enable VP9 codec + Spoof device information to enable vp9 codec + Enable vp9 codec Wide search bar is disabled Wide search bar is enabled Enable wide search bar @@ -192,12 +201,6 @@ Please do not report any issues you encounter while using this feature."Auto player popup panels are shown Auto player popup panels are hidden Hide auto player popup panels - Breaking news shelves are shown - Breaking news shelves are hidden - Hide breaking news shelf - Browse store button is shown - Browse store button is hidden - Hide browse store button Clip button is shown Clip button is hidden Hide clip button @@ -216,6 +219,9 @@ Please do not report any issues you encounter while using this feature."Playlist button is shown Playlist button is hidden Hide playlist button + Rewards button is shown + Rewards button is hidden + Hide rewards button Remix button is shown Remix button is hidden Hide remix button @@ -296,6 +302,9 @@ Please do not report any issues you encounter while using this feature."Fullscreen panels are shown Fullscreen panels are hidden Hide fullscreen panels + Gray description is shown + Gray description is hidden + Hide gray description Home button is shown Home button is hidden Hide home button @@ -398,9 +407,12 @@ Please do not report any issues you encounter while using this feature."Related videos are shown Related videos are hidden Hide related videos in quick actions - Seekbar is shown - Seekbar is hidden - Hide seekbar + Video player seekbar is shown + Video player seekbar is hidden + Hide seekbar in video player + Thumbnail seekbar is shown + Thumbnail seekbar is hidden + Hide seekbar in video thumbnails Seek message is shown Seek message is hidden Hide seek message @@ -430,6 +442,9 @@ Please do not report any issues you encounter while using this feature."Snack bar is shown Snack bar is hidden Hide snack bar + Speed overlay are shown + Speed overlay are hidden + Hide speed overlay Stories shelves are shown Stories shelves are hidden Hide stories shelf @@ -439,9 +454,9 @@ Please do not report any issues you encounter while using this feature."Suggested actions shown Suggested actions hidden Hide suggested actions - Suggestions are shown - Suggestions are hidden - Hide suggestions + Following shelves are shown: Breaking news, Explore more channels, Shopping + Following shelves are hidden: Breaking news, Explore more channels, Shopping + Hide suggestions shelf Teasers are shown Teasers are hidden Hide teaser under videos @@ -499,7 +514,7 @@ Please do not report any issues you encounter while using this feature."Player flyout panel Player Spoofing protobuf to prevent playback issues - Quick actions components (Experimental) + Quick actions components Restart to load the layout normally "As this is still an experimental feature, there may be other unknown issues. Are you sure you want to continue though?" @@ -527,6 +542,9 @@ Since these setting is quite outdated, it may not be valid" Dislikes are shown Enable Return YouTube Dislike Dislikes not available (client API limit reached) + Dislikes hidden on Shorts + Dislikes shown on Shorts + Show dislikes on Shorts Hidden Changing default mobile data quality to: Failed to set quality @@ -538,6 +556,18 @@ Since these setting is quite outdated, it may not be valid" Known issue: Title disappears when clicked Show fullscreen title SponsorBlock related settings + "Spoofing the client version to the old version + +This will change the appearance of the app, but unknown side effects may occur +If later turned off, the old UI may remain until clear the app data" + Spoof app version + 18.18.39 - Issue with old quality layout not working can be fixed + 17.41.37 - Playlists shelf in library tab follows old layout + 17.30.34 - Restore old UI layout + 17.06.35 - Enable sorting videos by oldest + 16.08.35 - Restore explore tab + Type the spoof app version target + Spoof app version target Swipe controls The amount of threshold for swipe to occur Swipe magnitude threshold @@ -547,9 +577,9 @@ Since these setting is quite outdated, it may not be valid" Swipe overlay text size The amount of milliseconds the overlay is visible Swipe overlay timeout - Create button and notification button not switching - Create button and notification button are switched - Switching the create button and notification button + Create button is not switched with notifications + Create button is switched with notifications + Switch create with notifications button Tool used Video Video ads are shown diff --git a/src/main/resources/youtube/settings/values-v21/strings.xml b/src/main/resources/youtube/settings/values-v21/strings.xml index d0ff3aad0..17db57eb3 100644 --- a/src/main/resources/youtube/settings/values-v21/strings.xml +++ b/src/main/resources/youtube/settings/values-v21/strings.xml @@ -3,6 +3,9 @@ @string/pref_about_category + <b>%1$s</b><br><br>This will change the language used on YouTube, including buttons, text and dialogs, but will not change the language of ReVanced Extended settings. + System default + @string/revanced_ad_remover_custom_filter_summary @string/revanced_ad_remover_custom_filter_title @@ -51,8 +54,6 @@ @string/revanced_hide_shorts_player_subscriptions_button_summary_on @string/revanced_hide_shorts_player_subscriptions_button_title - afn / blue - afn / red stock mmt revancify / blue diff --git a/src/main/resources/youtube/settings/xml/revanced_prefs.xml b/src/main/resources/youtube/settings/xml/revanced_prefs.xml index 2781066ec..a62d9412a 100644 --- a/src/main/resources/youtube/settings/xml/revanced_prefs.xml +++ b/src/main/resources/youtube/settings/xml/revanced_prefs.xml @@ -6,42 +6,555 @@ PREFERENCE: ADS_SETTINGS --> + + + SETTINGS: HIDE_GENERAL_ADS --> - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SETTINGS: HIDE_FILMSTRIP_OVERLAY --> - + + + + + + + + + + + + + + + + + + + + + + + + + + + SETTINGS: HIDE_SHORTS_COMPONENTS --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + SETTINGS: DEFAULT_VIDEO_QUALITY --> + SETTINGS: DEFAULT_VIDEO_SPEED --> + + + + + + @@ -405,176 +632,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file