mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 01:51:27 +01:00
fix(YouTube - Hide layout components): Fix "Hide video description attributes" (#5250)
This commit is contained in:
committed by
GitHub
parent
957bece3e9
commit
978c24458b
@@ -14,6 +14,9 @@ final class DescriptionComponentsFilter extends Filter {
|
||||
|
||||
private final StringFilterGroup macroMarkersCarousel;
|
||||
|
||||
private final StringFilterGroup horizontalShelf;
|
||||
private final ByteArrayFilterGroup cellVideoAttribute;
|
||||
|
||||
public DescriptionComponentsFilter() {
|
||||
exceptions.addPatterns(
|
||||
"compact_channel",
|
||||
@@ -35,8 +38,7 @@ final class DescriptionComponentsFilter extends Filter {
|
||||
|
||||
final StringFilterGroup attributesSection = new StringFilterGroup(
|
||||
Settings.HIDE_ATTRIBUTES_SECTION,
|
||||
"gaming_section",
|
||||
"music_section",
|
||||
// "gaming_section", "music_section"
|
||||
"video_attributes_section"
|
||||
);
|
||||
|
||||
@@ -76,15 +78,26 @@ final class DescriptionComponentsFilter extends Filter {
|
||||
)
|
||||
);
|
||||
|
||||
horizontalShelf = new StringFilterGroup(
|
||||
Settings.HIDE_ATTRIBUTES_SECTION,
|
||||
"horizontal_shelf.eml"
|
||||
);
|
||||
|
||||
cellVideoAttribute = new ByteArrayFilterGroup(
|
||||
null,
|
||||
"cell_video_attribute"
|
||||
);
|
||||
|
||||
addPathCallbacks(
|
||||
aiGeneratedVideoSummarySection,
|
||||
askSection,
|
||||
attributesSection,
|
||||
infoCardsSection,
|
||||
horizontalShelf,
|
||||
howThisWasMadeSection,
|
||||
macroMarkersCarousel,
|
||||
podcastSection,
|
||||
transcriptSection,
|
||||
macroMarkersCarousel
|
||||
transcriptSection
|
||||
);
|
||||
}
|
||||
|
||||
@@ -97,6 +110,10 @@ final class DescriptionComponentsFilter extends Filter {
|
||||
return contentIndex == 0 && macroMarkersCarouselGroupList.check(protobufBufferArray).isFiltered();
|
||||
}
|
||||
|
||||
if (matchedGroup == horizontalShelf) {
|
||||
return cellVideoAttribute.check(protobufBufferArray).isFiltered();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user