mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-13 21:03:54 +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 macroMarkersCarousel;
|
||||||
|
|
||||||
|
private final StringFilterGroup horizontalShelf;
|
||||||
|
private final ByteArrayFilterGroup cellVideoAttribute;
|
||||||
|
|
||||||
public DescriptionComponentsFilter() {
|
public DescriptionComponentsFilter() {
|
||||||
exceptions.addPatterns(
|
exceptions.addPatterns(
|
||||||
"compact_channel",
|
"compact_channel",
|
||||||
@@ -35,8 +38,7 @@ final class DescriptionComponentsFilter extends Filter {
|
|||||||
|
|
||||||
final StringFilterGroup attributesSection = new StringFilterGroup(
|
final StringFilterGroup attributesSection = new StringFilterGroup(
|
||||||
Settings.HIDE_ATTRIBUTES_SECTION,
|
Settings.HIDE_ATTRIBUTES_SECTION,
|
||||||
"gaming_section",
|
// "gaming_section", "music_section"
|
||||||
"music_section",
|
|
||||||
"video_attributes_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(
|
addPathCallbacks(
|
||||||
aiGeneratedVideoSummarySection,
|
aiGeneratedVideoSummarySection,
|
||||||
askSection,
|
askSection,
|
||||||
attributesSection,
|
attributesSection,
|
||||||
infoCardsSection,
|
infoCardsSection,
|
||||||
|
horizontalShelf,
|
||||||
howThisWasMadeSection,
|
howThisWasMadeSection,
|
||||||
|
macroMarkersCarousel,
|
||||||
podcastSection,
|
podcastSection,
|
||||||
transcriptSection,
|
transcriptSection
|
||||||
macroMarkersCarousel
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,6 +110,10 @@ final class DescriptionComponentsFilter extends Filter {
|
|||||||
return contentIndex == 0 && macroMarkersCarouselGroupList.check(protobufBufferArray).isFiltered();
|
return contentIndex == 0 && macroMarkersCarouselGroupList.check(protobufBufferArray).isFiltered();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (matchedGroup == horizontalShelf) {
|
||||||
|
return cellVideoAttribute.check(protobufBufferArray).isFiltered();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user