From 5a15809c96c4d6e988b196be8d0a85a828fe1d1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ho=C3=A0ng=20Gia=20B=E1=BA=A3o?= <70064328+YT-Advanced@users.noreply.github.com> Date: Wed, 4 Dec 2024 09:49:20 +0700 Subject: [PATCH] feat(YouTube - Overlay buttons): Replace `Time-ordered playlist` button with `Play all` button --- .../visual/VisualPreferencesIconsPatch.kt | 2 +- .../overlaybuttons/OverlayButtonsPatch.kt | 6 +-- ...utton.png => revanced_play_all_button.png} | Bin ...utton.png => revanced_play_all_button.png} | Bin ...utton.png => revanced_play_all_button.png} | Bin ...utton.png => revanced_play_all_button.png} | Bin ...utton.png => revanced_play_all_button.png} | Bin ...utton.png => revanced_play_all_button.png} | Bin ...utton.png => revanced_play_all_button.png} | Bin ...utton.png => revanced_play_all_button.png} | Bin ...utton.png => revanced_play_all_button.png} | Bin ...utton.png => revanced_play_all_button.png} | Bin .../youtube_controls_bottom_ui_container.xml | 4 +- ...utton.png => revanced_play_all_button.png} | Bin ...utton.png => revanced_play_all_button.png} | Bin ...utton.png => revanced_play_all_button.png} | Bin ...utton.png => revanced_play_all_button.png} | Bin ...utton.png => revanced_play_all_button.png} | Bin .../youtube/settings/host/values/arrays.xml | 28 +++++++++++ .../youtube/settings/xml/revanced_prefs.xml | 45 +++++++++--------- 20 files changed, 57 insertions(+), 28 deletions(-) rename src/main/resources/youtube/overlaybuttons/bold/drawable-hdpi/{revanced_time_ordered_playlist_button.png => revanced_play_all_button.png} (100%) rename src/main/resources/youtube/overlaybuttons/bold/drawable-mdpi/{revanced_time_ordered_playlist_button.png => revanced_play_all_button.png} (100%) rename src/main/resources/youtube/overlaybuttons/bold/drawable-xhdpi/{revanced_time_ordered_playlist_button.png => revanced_play_all_button.png} (100%) rename src/main/resources/youtube/overlaybuttons/bold/drawable-xxhdpi/{revanced_time_ordered_playlist_button.png => revanced_play_all_button.png} (100%) rename src/main/resources/youtube/overlaybuttons/bold/drawable-xxxhdpi/{revanced_time_ordered_playlist_button.png => revanced_play_all_button.png} (100%) rename src/main/resources/youtube/overlaybuttons/rounded/drawable-hdpi/{revanced_time_ordered_playlist_button.png => revanced_play_all_button.png} (100%) rename src/main/resources/youtube/overlaybuttons/rounded/drawable-mdpi/{revanced_time_ordered_playlist_button.png => revanced_play_all_button.png} (100%) rename src/main/resources/youtube/overlaybuttons/rounded/drawable-xhdpi/{revanced_time_ordered_playlist_button.png => revanced_play_all_button.png} (100%) rename src/main/resources/youtube/overlaybuttons/rounded/drawable-xxhdpi/{revanced_time_ordered_playlist_button.png => revanced_play_all_button.png} (100%) rename src/main/resources/youtube/overlaybuttons/rounded/drawable-xxxhdpi/{revanced_time_ordered_playlist_button.png => revanced_play_all_button.png} (100%) rename src/main/resources/youtube/overlaybuttons/thin/drawable-hdpi/{revanced_time_ordered_playlist_button.png => revanced_play_all_button.png} (100%) rename src/main/resources/youtube/overlaybuttons/thin/drawable-mdpi/{revanced_time_ordered_playlist_button.png => revanced_play_all_button.png} (100%) rename src/main/resources/youtube/overlaybuttons/thin/drawable-xhdpi/{revanced_time_ordered_playlist_button.png => revanced_play_all_button.png} (100%) rename src/main/resources/youtube/overlaybuttons/thin/drawable-xxhdpi/{revanced_time_ordered_playlist_button.png => revanced_play_all_button.png} (100%) rename src/main/resources/youtube/overlaybuttons/thin/drawable-xxxhdpi/{revanced_time_ordered_playlist_button.png => revanced_play_all_button.png} (100%) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/visual/VisualPreferencesIconsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/visual/VisualPreferencesIconsPatch.kt index 7e8f10ba8..b208eccd6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/visual/VisualPreferencesIconsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/visual/VisualPreferencesIconsPatch.kt @@ -190,7 +190,7 @@ object VisualPreferencesIconsPatch : BaseResourcePatch( "revanced_overlay_button_mute_volume" to "revanced_enable_swipe_volume", "revanced_overlay_button_external_downloader" to "M 480 626.231 L 341.615 487.846 L 363.846 466.384 L 464.615 566.384 L 464.615 200 L 495.385 200 L 495.385 566.384 L 596.154 466.384 L 618.385 487.846 L 480 626.231 Z M 255.384 760 Q 232.327 760 216.163 743.837 Q 200 727.673 200 704.616 L 200 597 L 230.769 597 L 230.769 704.616 Q 230.769 713.846 238.461 721.539 Q 246.154 729.231 255.384 729.231 L 704.616 729.231 Q 713.846 729.231 721.539 721.539 Q 729.231 713.846 729.231 704.616 L 729.231 597 L 760 597 L 760 704.616 Q 760 727.673 743.837 743.837 Q 727.673 760 704.616 760 L 255.384 760 Z", "revanced_overlay_button_speed_dialog" to "M 425.461 614.616 Q 443.077 632.616 475.038 630.346 Q 507 628.077 520.846 607.077 L 727.616 312.692 L 433.385 519.385 Q 411.846 534 409.846 565.308 Q 407.846 596.615 425.461 614.616 Z M 478.769 200.231 Q 533.462 200.231 582.385 214.884 Q 631.308 229.538 679.846 262.231 L 654 282.308 Q 613.615 256.154 568.269 243.577 Q 522.923 231 478.961 231 Q 342.121 231 246.445 327.639 Q 150.769 424.278 150.769 561.744 Q 150.769 605.154 162.5 648.462 Q 174.231 691.769 196.667 729.231 L 760.846 729.231 Q 783.615 692.462 795.462 647.923 Q 807.308 603.385 807.308 558.923 Q 807.308 520 795.962 473.423 Q 784.615 426.846 758 388.923 L 778.539 363.077 Q 811.923 416.769 824.385 462.884 Q 836.846 509 838.077 556.769 Q 838.539 609.077 826.846 654.385 Q 815.154 699.692 790.462 743.923 Q 784.616 753.846 777.654 756.923 Q 770.692 760 759.154 760 L 198.154 760 Q 189.511 760 181.14 754.962 Q 172.769 749.923 167.846 740.846 Q 148 705.154 134 661.423 Q 120 617.692 120 561.692 Q 120 487.923 147.978 422.218 Q 175.956 356.513 224.247 307.295 Q 272.538 258.077 338.295 229.154 Q 404.052 200.231 478.769 200.231 Z M 473.615 487.385 Z", - "revanced_overlay_button_time_ordered_playlist" to "M 160 626.154 L 160 595.384 L 434.461 595.384 L 434.461 626.154 L 160 626.154 Z M 160 463.462 L 160 432.692 L 595.308 432.692 L 595.308 463.462 L 160 463.462 Z M 160 301.538 L 160 270.769 L 595.308 270.769 L 595.308 301.538 L 160 301.538 Z M 668.154 800 L 668.154 561.077 L 840.769 681.308 L 668.154 800 Z", + "revanced_overlay_button_play_all" to "M 160 626.154 L 160 595.384 L 434.461 595.384 L 434.461 626.154 L 160 626.154 Z M 160 463.462 L 160 432.692 L 595.308 432.692 L 595.308 463.462 L 160 463.462 Z M 160 301.538 L 160 270.769 L 595.308 270.769 L 595.308 301.538 L 160 301.538 Z M 668.154 800 L 668.154 561.077 L 840.769 681.308 L 668.154 800 Z", "revanced_overlay_button_whitelist" to "M 803.769 847.462 L 711.846 756.308 Q 664.923 795.385 606.077 817.693 Q 547.231 840 480 840 Q 404.838 840 339.138 812.266 Q 273.438 784.531 224.454 735.546 Q 175.469 686.562 147.734 620.862 Q 120 555.162 120 480 Q 120 412.769 142.307 353.923 Q 164.615 295.077 203.692 248.154 L 112.538 156.231 L 134.769 134.769 L 825.231 825.231 L 803.769 847.462 Z M 480 809.231 Q 540.385 809.231 594 789.5 Q 647.615 769.769 690.385 734.077 L 225.923 269.615 Q 190.231 312.385 170.5 366 Q 150.769 419.615 150.769 480 Q 150.769 618.077 246.346 713.654 Q 341.923 809.231 480 809.231 Z M 780.154 680.308 L 757.923 658.077 Q 782.077 619.923 795.654 574.769 Q 809.231 529.615 809.231 480 Q 809.231 341.923 713.654 246.346 Q 618.077 150.769 480 150.769 Q 430.385 150.769 385.231 164.346 Q 340.077 177.923 301.923 202.077 L 279.692 179.846 Q 322.562 151.375 373.05 135.687 Q 423.538 120 480 120 Q 554.931 120 620.631 147.85 Q 686.331 175.7 735.316 224.684 Q 784.3 273.669 812.15 339.369 Q 840 405.069 840 480 Q 840 536.462 824.313 586.95 Q 808.625 637.438 780.154 680.308 Z M 529.923 430.077 Z M 457.769 502.231 Z", "revanced_preference_screen_account_menu" to "account_switcher_key", "revanced_preference_screen_action_buttons" to "M 258.308 662.923 L 701.692 662.923 L 701.692 589.461 L 258.308 589.461 L 258.308 662.923 Z M 175.384 760 Q 152.327 760 136.163 743.837 Q 120 727.673 120 704.616 L 120 255.384 Q 120 232.327 136.163 216.163 Q 152.327 200 175.384 200 L 784.616 200 Q 807.673 200 823.837 216.163 Q 840 232.327 840 255.384 L 840 704.616 Q 840 727.673 823.837 743.837 Q 807.673 760 784.616 760 L 175.384 760 Z M 175.384 729.231 L 784.616 729.231 Q 793.846 729.231 801.539 721.539 Q 809.231 713.846 809.231 704.616 L 809.231 255.384 Q 809.231 246.154 801.539 238.461 Q 793.846 230.769 784.616 230.769 L 175.384 230.769 Q 166.154 230.769 158.461 238.461 Q 150.769 246.154 150.769 255.384 L 150.769 704.616 Q 150.769 713.846 158.461 721.539 Q 166.154 729.231 175.384 729.231 Z M 150.769 729.231 L 150.769 230.769 L 150.769 729.231 Z", diff --git a/src/main/kotlin/app/revanced/patches/youtube/player/overlaybuttons/OverlayButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/player/overlaybuttons/OverlayButtonsPatch.kt index d67346f18..3745f4c26 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/player/overlaybuttons/OverlayButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/player/overlaybuttons/OverlayButtonsPatch.kt @@ -107,8 +107,8 @@ object OverlayButtonsPatch : BaseResourcePatch( "CopyVideoUrlTimestamp;", "MuteVolume;", "ExternalDownload;", + "PlayAll;", "SpeedDialog;", - "TimeOrderedPlaylist;", "Whitelists;" ).forEach { className -> PlayerControlsPatch.hookBottomControlButton("$OVERLAY_BUTTONS_PATH/$className") @@ -143,13 +143,13 @@ object OverlayButtonsPatch : BaseResourcePatch( "quantum_ic_fullscreen_exit_white_24.png", "quantum_ic_fullscreen_grey600_24.png", "quantum_ic_fullscreen_white_24.png", - "revanced_time_ordered_playlist_button.png", "revanced_copy_button.png", "revanced_copy_timestamp_button.png", "revanced_download_button.png", + "revanced_play_all_button.png", + "revanced_speed_button.png", "revanced_volume_muted_button.png", "revanced_volume_unmuted_button.png", - "revanced_speed_button.png", "revanced_whitelist_button.png", "yt_fill_arrow_repeat_white_24.png", "yt_outline_arrow_repeat_1_white_24.png", diff --git a/src/main/resources/youtube/overlaybuttons/bold/drawable-hdpi/revanced_time_ordered_playlist_button.png b/src/main/resources/youtube/overlaybuttons/bold/drawable-hdpi/revanced_play_all_button.png similarity index 100% rename from src/main/resources/youtube/overlaybuttons/bold/drawable-hdpi/revanced_time_ordered_playlist_button.png rename to src/main/resources/youtube/overlaybuttons/bold/drawable-hdpi/revanced_play_all_button.png diff --git a/src/main/resources/youtube/overlaybuttons/bold/drawable-mdpi/revanced_time_ordered_playlist_button.png b/src/main/resources/youtube/overlaybuttons/bold/drawable-mdpi/revanced_play_all_button.png similarity index 100% rename from src/main/resources/youtube/overlaybuttons/bold/drawable-mdpi/revanced_time_ordered_playlist_button.png rename to src/main/resources/youtube/overlaybuttons/bold/drawable-mdpi/revanced_play_all_button.png diff --git a/src/main/resources/youtube/overlaybuttons/bold/drawable-xhdpi/revanced_time_ordered_playlist_button.png b/src/main/resources/youtube/overlaybuttons/bold/drawable-xhdpi/revanced_play_all_button.png similarity index 100% rename from src/main/resources/youtube/overlaybuttons/bold/drawable-xhdpi/revanced_time_ordered_playlist_button.png rename to src/main/resources/youtube/overlaybuttons/bold/drawable-xhdpi/revanced_play_all_button.png diff --git a/src/main/resources/youtube/overlaybuttons/bold/drawable-xxhdpi/revanced_time_ordered_playlist_button.png b/src/main/resources/youtube/overlaybuttons/bold/drawable-xxhdpi/revanced_play_all_button.png similarity index 100% rename from src/main/resources/youtube/overlaybuttons/bold/drawable-xxhdpi/revanced_time_ordered_playlist_button.png rename to src/main/resources/youtube/overlaybuttons/bold/drawable-xxhdpi/revanced_play_all_button.png diff --git a/src/main/resources/youtube/overlaybuttons/bold/drawable-xxxhdpi/revanced_time_ordered_playlist_button.png b/src/main/resources/youtube/overlaybuttons/bold/drawable-xxxhdpi/revanced_play_all_button.png similarity index 100% rename from src/main/resources/youtube/overlaybuttons/bold/drawable-xxxhdpi/revanced_time_ordered_playlist_button.png rename to src/main/resources/youtube/overlaybuttons/bold/drawable-xxxhdpi/revanced_play_all_button.png diff --git a/src/main/resources/youtube/overlaybuttons/rounded/drawable-hdpi/revanced_time_ordered_playlist_button.png b/src/main/resources/youtube/overlaybuttons/rounded/drawable-hdpi/revanced_play_all_button.png similarity index 100% rename from src/main/resources/youtube/overlaybuttons/rounded/drawable-hdpi/revanced_time_ordered_playlist_button.png rename to src/main/resources/youtube/overlaybuttons/rounded/drawable-hdpi/revanced_play_all_button.png diff --git a/src/main/resources/youtube/overlaybuttons/rounded/drawable-mdpi/revanced_time_ordered_playlist_button.png b/src/main/resources/youtube/overlaybuttons/rounded/drawable-mdpi/revanced_play_all_button.png similarity index 100% rename from src/main/resources/youtube/overlaybuttons/rounded/drawable-mdpi/revanced_time_ordered_playlist_button.png rename to src/main/resources/youtube/overlaybuttons/rounded/drawable-mdpi/revanced_play_all_button.png diff --git a/src/main/resources/youtube/overlaybuttons/rounded/drawable-xhdpi/revanced_time_ordered_playlist_button.png b/src/main/resources/youtube/overlaybuttons/rounded/drawable-xhdpi/revanced_play_all_button.png similarity index 100% rename from src/main/resources/youtube/overlaybuttons/rounded/drawable-xhdpi/revanced_time_ordered_playlist_button.png rename to src/main/resources/youtube/overlaybuttons/rounded/drawable-xhdpi/revanced_play_all_button.png diff --git a/src/main/resources/youtube/overlaybuttons/rounded/drawable-xxhdpi/revanced_time_ordered_playlist_button.png b/src/main/resources/youtube/overlaybuttons/rounded/drawable-xxhdpi/revanced_play_all_button.png similarity index 100% rename from src/main/resources/youtube/overlaybuttons/rounded/drawable-xxhdpi/revanced_time_ordered_playlist_button.png rename to src/main/resources/youtube/overlaybuttons/rounded/drawable-xxhdpi/revanced_play_all_button.png diff --git a/src/main/resources/youtube/overlaybuttons/rounded/drawable-xxxhdpi/revanced_time_ordered_playlist_button.png b/src/main/resources/youtube/overlaybuttons/rounded/drawable-xxxhdpi/revanced_play_all_button.png similarity index 100% rename from src/main/resources/youtube/overlaybuttons/rounded/drawable-xxxhdpi/revanced_time_ordered_playlist_button.png rename to src/main/resources/youtube/overlaybuttons/rounded/drawable-xxxhdpi/revanced_play_all_button.png diff --git a/src/main/resources/youtube/overlaybuttons/shared/host/layout/youtube_controls_bottom_ui_container.xml b/src/main/resources/youtube/overlaybuttons/shared/host/layout/youtube_controls_bottom_ui_container.xml index 0953f47ea..8d155519a 100644 --- a/src/main/resources/youtube/overlaybuttons/shared/host/layout/youtube_controls_bottom_ui_container.xml +++ b/src/main/resources/youtube/overlaybuttons/shared/host/layout/youtube_controls_bottom_ui_container.xml @@ -4,8 +4,8 @@ - - + + diff --git a/src/main/resources/youtube/overlaybuttons/thin/drawable-hdpi/revanced_time_ordered_playlist_button.png b/src/main/resources/youtube/overlaybuttons/thin/drawable-hdpi/revanced_play_all_button.png similarity index 100% rename from src/main/resources/youtube/overlaybuttons/thin/drawable-hdpi/revanced_time_ordered_playlist_button.png rename to src/main/resources/youtube/overlaybuttons/thin/drawable-hdpi/revanced_play_all_button.png diff --git a/src/main/resources/youtube/overlaybuttons/thin/drawable-mdpi/revanced_time_ordered_playlist_button.png b/src/main/resources/youtube/overlaybuttons/thin/drawable-mdpi/revanced_play_all_button.png similarity index 100% rename from src/main/resources/youtube/overlaybuttons/thin/drawable-mdpi/revanced_time_ordered_playlist_button.png rename to src/main/resources/youtube/overlaybuttons/thin/drawable-mdpi/revanced_play_all_button.png diff --git a/src/main/resources/youtube/overlaybuttons/thin/drawable-xhdpi/revanced_time_ordered_playlist_button.png b/src/main/resources/youtube/overlaybuttons/thin/drawable-xhdpi/revanced_play_all_button.png similarity index 100% rename from src/main/resources/youtube/overlaybuttons/thin/drawable-xhdpi/revanced_time_ordered_playlist_button.png rename to src/main/resources/youtube/overlaybuttons/thin/drawable-xhdpi/revanced_play_all_button.png diff --git a/src/main/resources/youtube/overlaybuttons/thin/drawable-xxhdpi/revanced_time_ordered_playlist_button.png b/src/main/resources/youtube/overlaybuttons/thin/drawable-xxhdpi/revanced_play_all_button.png similarity index 100% rename from src/main/resources/youtube/overlaybuttons/thin/drawable-xxhdpi/revanced_time_ordered_playlist_button.png rename to src/main/resources/youtube/overlaybuttons/thin/drawable-xxhdpi/revanced_play_all_button.png diff --git a/src/main/resources/youtube/overlaybuttons/thin/drawable-xxxhdpi/revanced_time_ordered_playlist_button.png b/src/main/resources/youtube/overlaybuttons/thin/drawable-xxxhdpi/revanced_play_all_button.png similarity index 100% rename from src/main/resources/youtube/overlaybuttons/thin/drawable-xxxhdpi/revanced_time_ordered_playlist_button.png rename to src/main/resources/youtube/overlaybuttons/thin/drawable-xxxhdpi/revanced_play_all_button.png diff --git a/src/main/resources/youtube/settings/host/values/arrays.xml b/src/main/resources/youtube/settings/host/values/arrays.xml index 457f20448..dbe9a15b6 100644 --- a/src/main/resources/youtube/settings/host/values/arrays.xml +++ b/src/main/resources/youtube/settings/host/values/arrays.xml @@ -155,6 +155,34 @@ https://github.com/deniscerri/ytdlnis/releases/latest + + @string/revanced_overlay_button_play_all_type_entry_1 + @string/revanced_overlay_button_play_all_type_entry_2 + @string/revanced_overlay_button_play_all_type_entry_3 + @string/revanced_overlay_button_play_all_type_entry_4 + @string/revanced_overlay_button_play_all_type_entry_5 + @string/revanced_overlay_button_play_all_type_entry_6 + @string/revanced_overlay_button_play_all_type_entry_7 + @string/revanced_overlay_button_play_all_type_entry_8 + @string/revanced_overlay_button_play_all_type_entry_9 + @string/revanced_overlay_button_play_all_type_entry_10 + @string/revanced_overlay_button_play_all_type_entry_11 + @string/revanced_overlay_button_play_all_type_entry_12 + + + ALL_CONTENTS_WITH_TIME_DESCENDING + ALL_CONTENTS_WITH_POPULAR_DESCENDING + VIDEOS_ONLY_WITH_TIME_DESCENDING + VIDEOS_ONLY_WITH_POPULAR_DESCENDING + SHORTS_ONLY_WITH_TIME_DESCENDING + SHORTS_ONLY_WITH_POPULAR_DESCENDING + LIVESTREAMS_ONLY_WITH_TIME_DESCENDING + LIVESTREAMS_ONLY_WITH_POPULAR_DESCENDING + ALL_MEMBERSHIPS_CONTENTS + MEMBERSHIPS_VIDEOS_ONLY + MEMBERSHIPS_SHORTS_ONLY + MEMBERSHIPS_LIVESTREAMS_ONLY + @string/revanced_miniplayer_type_entry_1 @string/revanced_miniplayer_type_entry_2 diff --git a/src/main/resources/youtube/settings/xml/revanced_prefs.xml b/src/main/resources/youtube/settings/xml/revanced_prefs.xml index 82f7608ab..e25d0260b 100644 --- a/src/main/resources/youtube/settings/xml/revanced_prefs.xml +++ b/src/main/resources/youtube/settings/xml/revanced_prefs.xml @@ -293,28 +293,29 @@ - - - + + +