Skip to content

Commit 1473db0

Browse files
author
LisoUseInAIKyrios
committed
fix(YouTube - Hide layout components): Hide Playable shelf header
1 parent 829ca58 commit 1473db0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/LayoutComponentsFilter.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public final class LayoutComponentsFilter extends Filter {
4545
private final StringFilterGroup chipBar;
4646
private final StringFilterGroup channelProfile;
4747
private final ByteArrayFilterGroupList channelProfileBuffer;
48+
private final ByteArrayFilterGroup playablesBuffer;
4849

4950
public LayoutComponentsFilter() {
5051
exceptions.addPatterns(
@@ -190,6 +191,12 @@ public LayoutComponentsFilter() {
190191
"mini_game_card.eml"
191192
);
192193

194+
// Playable horizontal shelf header.
195+
playablesBuffer = new ByteArrayFilterGroup(
196+
Settings.HIDE_PLAYABLES,
197+
"mini_game"
198+
);
199+
193200
final var quickActions = new StringFilterGroup(
194201
Settings.HIDE_QUICK_ACTIONS,
195202
"quick_actions"
@@ -342,7 +349,9 @@ boolean isFiltered(String identifier, String path, byte[] buffer,
342349
}
343350

344351
if (matchedGroup == horizontalShelves) {
345-
return contentIndex == 0 && (hideShelves() || ticketShelf.check(buffer).isFiltered());
352+
return contentIndex == 0 && (hideShelves()
353+
|| ticketShelf.check(buffer).isFiltered()
354+
|| playablesBuffer.check(buffer).isFiltered());
346355
}
347356

348357
if (matchedGroup == chipBar) {

0 commit comments

Comments
 (0)