33import app .revanced .extension .shared .settings .Setting ;
44import app .revanced .extension .shared .spoof .SpoofVideoStreamsPatch ;
55import app .revanced .extension .youtube .settings .Settings ;
6- import app .revanced .extension .youtube .shared .PlayerType ;
6+ import app .revanced .extension .youtube .shared .ShortsPlayerState ;
77
88@ SuppressWarnings ("unused" )
99public class PlayerFlyoutMenuItemsFilter extends Filter {
@@ -20,17 +20,9 @@ public boolean isAvailable() {
2020 }
2121
2222 private final ByteArrayFilterGroupList flyoutFilterGroupList = new ByteArrayFilterGroupList ();
23-
24- private final ByteArrayFilterGroup exception ;
2523 private final StringFilterGroup videoQualityMenuFooter ;
2624
2725 public PlayerFlyoutMenuItemsFilter () {
28- exception = new ByteArrayFilterGroup (
29- // Whitelist Quality menu item when "Hide Additional settings menu" is enabled
30- Settings .HIDE_PLAYER_FLYOUT_ADDITIONAL_SETTINGS ,
31- "quality_sheet"
32- );
33-
3426 videoQualityMenuFooter = new StringFilterGroup (
3527 Settings .HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER ,
3628 "quality_sheet_footer"
@@ -44,51 +36,55 @@ public PlayerFlyoutMenuItemsFilter() {
4436 flyoutFilterGroupList .addAll (
4537 new ByteArrayFilterGroup (
4638 Settings .HIDE_PLAYER_FLYOUT_CAPTIONS ,
47- "closed_caption "
39+ "closed_caption_ "
4840 ),
4941 new ByteArrayFilterGroup (
5042 Settings .HIDE_PLAYER_FLYOUT_ADDITIONAL_SETTINGS ,
51- "yt_outline_gear "
43+ "yt_outline_gear_ "
5244 ),
5345 new ByteArrayFilterGroup (
5446 Settings .HIDE_PLAYER_FLYOUT_LOOP_VIDEO ,
5547 "yt_outline_arrow_repeat_1_"
5648 ),
5749 new ByteArrayFilterGroup (
5850 Settings .HIDE_PLAYER_FLYOUT_AMBIENT_MODE ,
59- "yt_outline_screen_light "
51+ "yt_outline_screen_light_ "
6052 ),
6153 new ByteArrayFilterGroup (
6254 Settings .HIDE_PLAYER_FLYOUT_STABLE_VOLUME ,
63- "volume_stable "
55+ "volume_stable_ "
6456 ),
6557 new ByteArrayFilterGroup (
6658 Settings .HIDE_PLAYER_FLYOUT_HELP ,
67- "yt_outline_question_circle "
59+ "yt_outline_question_circle_ "
6860 ),
6961 new ByteArrayFilterGroup (
7062 Settings .HIDE_PLAYER_FLYOUT_MORE_INFO ,
71- "yt_outline_info_circle "
63+ "yt_outline_info_circle_ "
7264 ),
7365 new ByteArrayFilterGroup (
7466 Settings .HIDE_PLAYER_FLYOUT_LOCK_SCREEN ,
75- "yt_outline_lock "
67+ "yt_outline_lock_ "
7668 ),
7769 new ByteArrayFilterGroup (
7870 Settings .HIDE_PLAYER_FLYOUT_SPEED ,
79- "yt_outline_play_arrow_half_circle "
71+ "yt_outline_play_arrow_half_circle_ "
8072 ),
8173 new ByteArrayFilterGroup (
8274 Settings .HIDE_PLAYER_FLYOUT_AUDIO_TRACK ,
83- "yt_outline_person_radar "
75+ "yt_outline_person_radar_ "
8476 ),
8577 new ByteArrayFilterGroup (
8678 Settings .HIDE_PLAYER_FLYOUT_SLEEP_TIMER ,
8779 "yt_outline_moon_z_"
8880 ),
8981 new ByteArrayFilterGroup (
9082 Settings .HIDE_PLAYER_FLYOUT_WATCH_IN_VR ,
91- "yt_outline_vr"
83+ "yt_outline_vr_"
84+ ),
85+ new ByteArrayFilterGroup (
86+ Settings .HIDE_PLAYER_FLYOUT_VIDEO_QUALITY ,
87+ "yt_outline_adjust_"
9288 )
9389 );
9490 }
@@ -105,7 +101,7 @@ boolean isFiltered(String identifier, String path, byte[] buffer,
105101 }
106102
107103 // Shorts also use this player flyout panel
108- if (PlayerType . getCurrent (). isNoneOrHidden () || exception . check ( buffer ). isFiltered ()) {
104+ if (ShortsPlayerState . isOpen ()) {
109105 return false ;
110106 }
111107
0 commit comments