Skip to content

Commit

Permalink
fix(YouTube - Hide feed components): Hide UPCOMING video setting no…
Browse files Browse the repository at this point in the history
…w only hides the video when the thumbnail can be hidden
  • Loading branch information
anddea committed Oct 15, 2024
1 parent ad3b6fb commit afd9da0
Showing 1 changed file with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ public final class FeedVideoFilter extends Filter {
// In search results, vertical video with shorts labels mostly include videos with gray descriptions.
// Filters without check process.
private final StringFilterGroup inlineShorts;
private final StringFilterGroup videoLockup;
// Used for home, related videos, subscriptions, and search results.
private final StringFilterGroup videoLockup = new StringFilterGroup(
null,
"video_lockup_with_attachment.eml"
);
private final ByteArrayFilterGroupList feedAndDrawerGroupList = new ByteArrayFilterGroupList();
private final ByteArrayFilterGroupList feedOnlyGroupList = new ByteArrayFilterGroupList();
private final StringFilterGroupList videoLockupFilterGroup = new StringFilterGroupList();
Expand All @@ -41,30 +45,25 @@ public FeedVideoFilter() {

addIdentifierCallbacks(inlineShorts);

// Used for home, related videos, subscriptions, and search results.
videoLockup = new StringFilterGroup(
null,
"video_lockup_with_attachment.eml"
);

addPathCallbacks(videoLockup);

feedAndDrawerGroupList.addAll(
new ByteArrayFilterGroup(
Settings.HIDE_RECOMMENDED_VIDEO,
ENDORSEMENT_FOOTER_PATH, // videos with gray descriptions
"high-ptsZ" // videos for membership only
),
new ByteArrayFilterGroup(
Settings.HIDE_UPCOMING_VIDEO,
"set_reminder_button" // upcoming videos
)
);

feedOnlyGroupList.addAll(
new ByteArrayFilterGroup(
Settings.HIDE_LOW_VIEWS_VIDEO,
"g-highZ" // videos with less than 1000 views
),
new ByteArrayFilterGroup(
Settings.HIDE_UPCOMING_VIDEO,
"ic_play_disabled_white",
"set_reminder_button" // upcoming videos
)
);

Expand Down

0 comments on commit afd9da0

Please sign in to comment.