@@ -44,6 +44,8 @@ public final class ShortsFilter extends Filter {
44
44
private final ByteArrayFilterGroup shortsCompactFeedVideoBuffer ;
45
45
private final StringFilterGroup useSoundButton ;
46
46
private final ByteArrayFilterGroup useSoundButtonBuffer ;
47
+ private final StringFilterGroup useTemplateButton ;
48
+ private final ByteArrayFilterGroup useTemplateButtonBuffer ;
47
49
48
50
private final StringFilterGroup subscribeButton ;
49
51
private final StringFilterGroup joinButton ;
@@ -187,6 +189,16 @@ public ShortsFilter() {
187
189
"yt_outline_camera_"
188
190
);
189
191
192
+ useTemplateButton = new StringFilterGroup (
193
+ Settings .HIDE_SHORTS_USE_TEMPLATE_BUTTON ,
194
+ REEL_METAPANEL_PATH
195
+ );
196
+
197
+ useTemplateButtonBuffer = new ByteArrayFilterGroup (
198
+ null ,
199
+ "yt_outline_template_add_"
200
+ );
201
+
190
202
videoActionButton = new StringFilterGroup (
191
203
null ,
192
204
// Can be simply 'button.eml', 'shorts_video_action_button.eml' or 'reel_action_button.eml'
@@ -195,8 +207,7 @@ public ShortsFilter() {
195
207
196
208
suggestedAction = new StringFilterGroup (
197
209
null ,
198
- "suggested_action.eml" ,
199
- REEL_METAPANEL_PATH
210
+ "suggested_action.eml"
200
211
);
201
212
202
213
addPathCallbacks (
@@ -268,6 +279,7 @@ public ShortsFilter() {
268
279
),
269
280
new ByteArrayFilterGroup (
270
281
Settings .HIDE_SHORTS_USE_TEMPLATE_BUTTON ,
282
+ // "Use this template" can appear in two different places.
271
283
"yt_outline_template_add_"
272
284
),
273
285
new ByteArrayFilterGroup (
@@ -317,6 +329,10 @@ boolean isFiltered(@Nullable String identifier, String path, byte[] protobufBuff
317
329
return useSoundButtonBuffer .check (protobufBufferArray ).isFiltered ();
318
330
}
319
331
332
+ if (matchedGroup == useTemplateButton ) {
333
+ return useTemplateButtonBuffer .check (protobufBufferArray ).isFiltered ();
334
+ }
335
+
320
336
if (matchedGroup == shortsCompactFeedVideo ) {
321
337
return shouldHideShortsFeedItems () && shortsCompactFeedVideoBuffer .check (protobufBufferArray ).isFiltered ();
322
338
}
0 commit comments