@@ -64,48 +64,45 @@ public AdsFilter() {
64
64
"_interstitial"
65
65
);
66
66
67
- final var buttonedAd = new StringFilterGroup (
68
- Settings .HIDE_BUTTONED_ADS ,
67
+ final var generalAds = new StringFilterGroup (
68
+ Settings .HIDE_GENERAL_ADS ,
69
69
"_ad_with" ,
70
70
"_buttoned_layout" ,
71
+ "ads_video_with_context" ,
72
+ "banner_text_icon" ,
73
+ "brand_video_shelf" ,
74
+ "brand_video_singleton" ,
75
+ "carousel_footered_layout" ,
76
+ "carousel_headered_layout" ,
77
+ "compact_landscape_image_layout" , // Tablet layout search results.
78
+ "composite_concurrent_carousel_layout" ,
79
+ "full_width_portrait_image_layout" ,
80
+ "full_width_square_image_carousel_layout" ,
81
+ "full_width_square_image_layout" ,
82
+ "hero_promo_image" ,
71
83
// text_image_button_group_layout, landscape_image_button_group_layout, full_width_square_image_button_group_layout
72
84
"image_button_group_layout" ,
73
- "full_width_square_image_layout" ,
74
- "video_display_button_group_layout" ,
75
85
"landscape_image_wide_button_layout" ,
76
- "video_display_carousel_button_group_layout" ,
77
- "video_display_full_buttoned_short_dr_layout" ,
78
- "compact_landscape_image_layout" , // Tablet layout search results.
79
- "text_image_no_button_layout" // Tablet layout search results.
80
- );
81
-
82
- final var generalAds = new StringFilterGroup (
83
- Settings .HIDE_GENERAL_ADS ,
84
- "ads_video_with_context" ,
85
- "banner_text_icon" ,
86
+ "primetime_promo" ,
87
+ "product_details" ,
86
88
"square_image_layout" ,
87
- "watch_metadata_app_promo" ,
88
- "video_display_full_layout" ,
89
- "hero_promo_image" ,
90
89
"statement_banner" ,
91
- "carousel_footered_layout" ,
92
90
"text_image_button_layout" ,
93
- "primetime_promo" ,
94
- "product_details" ,
95
- "composite_concurrent_carousel_layout" ,
96
- "carousel_headered_layout" ,
97
- "full_width_portrait_image_layout" ,
98
- "brand_video_shelf" ,
99
- "brand_video_singleton"
91
+ "text_image_no_button_layout" , // Tablet layout search results.
92
+ "video_display_button_group_layout" ,
93
+ "video_display_carousel_button_group_layout" ,
94
+ "video_display_full_buttoned_short_dr_layout" ,
95
+ "video_display_full_layout" ,
96
+ "watch_metadata_app_promo"
100
97
);
101
98
102
99
final var movieAds = new StringFilterGroup (
103
100
Settings .HIDE_MOVIES_SECTION ,
104
101
"browsy_bar" ,
105
102
"compact_movie" ,
103
+ "compact_tvfilm_item" ,
106
104
"horizontal_movie_shelf" ,
107
105
"movie_and_show_upsell_card" ,
108
- "compact_tvfilm_item" ,
109
106
"offer_module_root"
110
107
);
111
108
@@ -160,7 +157,6 @@ public AdsFilter() {
160
157
161
158
addPathCallbacks (
162
159
generalAds ,
163
- buttonedAd ,
164
160
merchandise ,
165
161
viewProducts ,
166
162
selfSponsor ,
@@ -181,17 +177,19 @@ boolean isFiltered(@Nullable String identifier, String path, byte[] protobufBuff
181
177
}
182
178
183
179
// Check for the index because of likelihood of false positives.
184
- if (matchedGroup == shoppingLinks && contentIndex != 0 ) {
180
+ if (contentIndex != 0 && matchedGroup == shoppingLinks ) {
185
181
return false ;
186
182
}
187
183
188
- if (exceptions .matches (path ))
184
+ if (exceptions .matches (path )) {
189
185
return false ;
186
+ }
190
187
191
188
if (matchedGroup == fullscreenAd ) {
192
189
if (path .contains ("|ImageType|" )) closeFullscreenAd ();
193
190
194
- return false ; // Do not actually filter the fullscreen ad otherwise it will leave a dimmed screen.
191
+ // Do not actually filter the fullscreen ad otherwise it will leave a dimmed screen.
192
+ return false ;
195
193
}
196
194
197
195
if (matchedGroup == channelProfile ) {
0 commit comments