From 15096257ca84803cd03a330ae317d450b579cc94 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 11 Mar 2026 11:24:05 +0100 Subject: [PATCH] fix(YouTube - Hide Shorts components): Hide Shorts shelf hides autoplaying videos in the feed Co-Authored-By: inotia00 <108592928+inotia00@users.noreply.github.com> --- .../youtube/patches/litho/ShortsFilter.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/litho/ShortsFilter.java b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/litho/ShortsFilter.java index ecbe75a259..d4fd98f96d 100644 --- a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/litho/ShortsFilter.java +++ b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/litho/ShortsFilter.java @@ -26,10 +26,6 @@ import app.revanced.extension.youtube.shared.PlayerType; public final class ShortsFilter extends Filter { private static final boolean HIDE_SHORTS_NAVIGATION_BAR = Settings.HIDE_SHORTS_NAVIGATION_BAR.get(); private static final String COMPONENT_TYPE = "ComponentType"; - private static final String[] REEL_ACTION_BAR_PATHS = { - "reel_action_bar.", // Regular Shorts. - "reels_player_overlay_layout." // Shorts ads. - }; private final String REEL_CHANNEL_BAR_PATH = "reel_channel_bar.e"; /** @@ -498,6 +494,15 @@ public final class ShortsFilter extends Filter { if (!hideHome && !hideSubscriptions && !hideSearch && !hideVideoDescription && !hideHistory) { return false; } + // The Litho path of the feed video is 'video_lockup_with_attachment.e'. + // It appears shortsCompactFeedVideoBuffer is used after 20 seconds during autoplay in the feed in YouTube 20.44.38. + // If the Shorts shelf is hidden on the Home feed, the video in the feed will be hidden after 20 seconds have passed since autoplay began in the feed. + // + // When a video is autoplaying in the feed, no new components are drawn on the screen. + // Therefore, filtering is skipped when the current PlayerType is INLINE_MINIMAL. + if (PlayerType.getCurrent() == PlayerType.INLINE_MINIMAL) { + return false; + } if (hideHome && hideSubscriptions && hideSearch && hideVideoDescription && hideHistory) { return true; }