Skip to content

Commit

Permalink
feat(YouTube - Overlay buttons): Replace Time-ordered playlist butt…
Browse files Browse the repository at this point in the history
…on with `Play all` button
  • Loading branch information
YT-Advanced authored and anddea committed Dec 9, 2024
1 parent e6ebeb1 commit 5a15809
Show file tree
Hide file tree
Showing 20 changed files with 57 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ object OverlayButtonsPatch : BaseResourcePatch(
"CopyVideoUrlTimestamp;",
"MuteVolume;",
"ExternalDownload;",
"PlayAll;",
"SpeedDialog;",
"TimeOrderedPlaylist;",
"Whitelists;"
).forEach { className ->
PlayerControlsPatch.hookBottomControlButton("$OVERLAY_BUTTONS_PATH/$className")
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/copy_video_url_button" android:contentDescription="@string/revanced_overlay_button_copy_video_url_title" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_copy_button" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/copy_video_url_timestamp_button" style="@style/YouTubePlayerButton"/>
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/copy_video_url_timestamp_button" android:contentDescription="@string/revanced_overlay_button_copy_video_url_timestamp_title" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_copy_timestamp_button" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/mute_volume_button" style="@style/YouTubePlayerButton"/>
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/mute_volume_button" android:contentDescription="@string/revanced_overlay_button_mute_volume_title" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_mute_volume_button" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/whitelist_button" style="@style/YouTubePlayerButton"/>
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/whitelist_button" android:contentDescription="@string/revanced_overlay_button_whitelist_title" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_whitelist_button" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/time_ordered_playlist_button" style="@style/YouTubePlayerButton"/>
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/time_ordered_playlist_button" android:contentDescription="@string/revanced_overlay_button_time_ordered_playlist_title" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_time_ordered_playlist_button" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/always_repeat_button" style="@style/YouTubePlayerButton"/>
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/whitelist_button" android:contentDescription="@string/revanced_overlay_button_whitelist_title" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_whitelist_button" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/play_all_button" style="@style/YouTubePlayerButton"/>
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/play_all_button" android:contentDescription="@string/revanced_overlay_button_play_all_title" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_play_all_button" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/always_repeat_button" style="@style/YouTubePlayerButton"/>
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/always_repeat_button" android:contentDescription="@string/revanced_overlay_button_always_repeat_title" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_repeat_button" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/external_download_button" style="@style/YouTubePlayerButton"/>
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/external_download_button" android:contentDescription="@string/revanced_overlay_button_external_downloader_title" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_download_button" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/fullscreen_button" style="@style/YouTubePlayerButton"/>
</android.support.constraint.ConstraintLayout>
28 changes: 28 additions & 0 deletions src/main/resources/youtube/settings/host/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,34 @@
<string-array name="revanced_external_downloader_playlist_website">
<item>https://github.com/deniscerri/ytdlnis/releases/latest</item>
</string-array>
<string-array name="revanced_overlay_button_play_all_type_entries">
<item>@string/revanced_overlay_button_play_all_type_entry_1</item>
<item>@string/revanced_overlay_button_play_all_type_entry_2</item>
<item>@string/revanced_overlay_button_play_all_type_entry_3</item>
<item>@string/revanced_overlay_button_play_all_type_entry_4</item>
<item>@string/revanced_overlay_button_play_all_type_entry_5</item>
<item>@string/revanced_overlay_button_play_all_type_entry_6</item>
<item>@string/revanced_overlay_button_play_all_type_entry_7</item>
<item>@string/revanced_overlay_button_play_all_type_entry_8</item>
<item>@string/revanced_overlay_button_play_all_type_entry_9</item>
<item>@string/revanced_overlay_button_play_all_type_entry_10</item>
<item>@string/revanced_overlay_button_play_all_type_entry_11</item>
<item>@string/revanced_overlay_button_play_all_type_entry_12</item>
</string-array>
<string-array name="revanced_overlay_button_play_all_type_entry_values">
<item>ALL_CONTENTS_WITH_TIME_DESCENDING</item>
<item>ALL_CONTENTS_WITH_POPULAR_DESCENDING</item>
<item>VIDEOS_ONLY_WITH_TIME_DESCENDING</item>
<item>VIDEOS_ONLY_WITH_POPULAR_DESCENDING</item>
<item>SHORTS_ONLY_WITH_TIME_DESCENDING</item>
<item>SHORTS_ONLY_WITH_POPULAR_DESCENDING</item>
<item>LIVESTREAMS_ONLY_WITH_TIME_DESCENDING</item>
<item>LIVESTREAMS_ONLY_WITH_POPULAR_DESCENDING</item>
<item>ALL_MEMBERSHIPS_CONTENTS</item>
<item>MEMBERSHIPS_VIDEOS_ONLY</item>
<item>MEMBERSHIPS_SHORTS_ONLY</item>
<item>MEMBERSHIPS_LIVESTREAMS_ONLY</item>
</string-array>
<string-array name="revanced_miniplayer_type_19_15_entries">
<item>@string/revanced_miniplayer_type_entry_1</item>
<item>@string/revanced_miniplayer_type_entry_2</item>
Expand Down
Loading

0 comments on commit 5a15809

Please sign in to comment.