Skip to content

Commit c65e174

Browse files
fix(YouTube - Hide layout components): Fix "Hide AI-generated video summary" in video description
1 parent 9a286b4 commit c65e174

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import app.revanced.extension.youtube.StringTrieSearch;
66
import app.revanced.extension.youtube.settings.Settings;
7+
import app.revanced.extension.youtube.shared.PlayerType;
78

89
@SuppressWarnings("unused")
910
final class DescriptionComponentsFilter extends Filter {
@@ -104,6 +105,12 @@ public DescriptionComponentsFilter() {
104105
@Override
105106
boolean isFiltered(@Nullable String identifier, String path, byte[] protobufBufferArray,
106107
StringFilterGroup matchedGroup, FilterContentType contentType, int contentIndex) {
108+
109+
if (matchedGroup == aiGeneratedVideoSummarySection) {
110+
// Only hide if player is open, in case this component is used somewhere else.
111+
return PlayerType.getCurrent().isMaximizedOrFullscreen();
112+
}
113+
107114
if (exceptions.matches(path)) return false;
108115

109116
if (matchedGroup == macroMarkersCarousel) {

0 commit comments

Comments
 (0)