mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-06-02 11:26:18 +02:00
fix(YouTube - Hide Shorts components): Hide Shorts in search result horizontal shelves
This commit is contained in:
parent
973e51ea1b
commit
fa438343d1
|
@ -69,8 +69,12 @@ public final class ShortsFilter extends Filter {
|
||||||
// Path components.
|
// Path components.
|
||||||
//
|
//
|
||||||
|
|
||||||
// Shorts that appear in the feed/search when the device is using tablet layout.
|
shortsCompactFeedVideoPath = new StringFilterGroup(null,
|
||||||
shortsCompactFeedVideoPath = new StringFilterGroup(null, "compact_video.eml");
|
// Shorts that appear in the feed/search when the device is using tablet layout.
|
||||||
|
"compact_video.eml",
|
||||||
|
// Search results that appear in a horizontal shelf.
|
||||||
|
"video_card.eml");
|
||||||
|
|
||||||
// Filter out items that use the 'frame0' thumbnail.
|
// Filter out items that use the 'frame0' thumbnail.
|
||||||
// This is a valid thumbnail for both regular videos and Shorts,
|
// This is a valid thumbnail for both regular videos and Shorts,
|
||||||
// but it appears these thumbnails are used only for Shorts.
|
// but it appears these thumbnails are used only for Shorts.
|
||||||
|
@ -217,8 +221,7 @@ public final class ShortsFilter extends Filter {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matchedGroup == shortsCompactFeedVideoPath) {
|
if (matchedGroup == shortsCompactFeedVideoPath) {
|
||||||
if (shouldHideShortsFeedItems() && contentIndex == 0
|
if (shouldHideShortsFeedItems() && shortsCompactFeedVideoBuffer.check(protobufBufferArray).isFiltered()) {
|
||||||
&& shortsCompactFeedVideoBuffer.check(protobufBufferArray).isFiltered()) {
|
|
||||||
return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex);
|
return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user