ReVanced / revanced-patches

🧩 Patches for ReVanced
https://revanced.app
GNU General Public License v3.0
2.14k stars 245 forks source link

feat(YouTube): Hide channels from search results #3399

Open mat926 opened 1 month ago

mat926 commented 1 month ago

Feature description

I want to block certain channels from the search results. Please add a filter for blocked channels.

Motivation

There is already a setting to hide keyword content, but that hides channel videos and hides videos with the channel name in the video title.

Partial solution

Add a keyword filter for the channel name and all regular (non-Shorts) videos will be hidden along with all videos with the channel name in the title. To selectively hide just the channel (and not other videos with the keyword in the title) try this.

Acknowledgements

oSumAtrIX commented 1 month ago

A keyword content filter already exists like you said. If it does not work, open a bug report.

mat926 commented 1 month ago

@oSumAtrIX The issue with a keyword content filter is I don't want to block other channels that might contain the keyword in the title. I explicitly want to block all videos from a certain channel. Like in this example video. This was not uploaded by MrBeast but it would still be hidden since the title contains his name.

LisoUseInAIKyrios commented 1 month ago

Something like this is only useful for search.

On the home feed you can already pick "Don't recommend this channel" from a video flyout menu.

LisoUseInAIKyrios commented 1 month ago

For now, you can hide specific channels by using dashes around the channel name. Such as - MrBeast - (must include exactly one space between each dash and the channel name). Then regular videos from his main channel are hidden while other videos that mention him are not hidden.

And as usual, this will not hide Shorts from any channel because the channel name does not appear with Shorts search results.

Jeanfeels commented 1 month ago

This workaround using - Channel Name - as a filtered keyword does not hide playlist suggestions from these channels in the Home feed. It is not an adequate solution and a better one would be appreciated.

Screenshot_20240710-213051 (1)

For now, you can hide specific channels by using dashes around the channel name. Such as - MrBeast - (must include exactly one space between each dash and the channel name). Then regular videos from his main channel are hidden while other videos that mention him are not hidden.

And as usual, this will not hide Shorts from any channel because the channel name does not appear with Shorts search results.

LisoUseInAIKyrios commented 1 month ago

Using - Channel name - works for me and playlists from that channel are hidden in search results. I cannot verify in the home feed because playlists are never suggested to me.

In the home feed you should be able to hide a channel by opening the three dot flyout menu and selecting "do not recommend channel"

Jeanfeels commented 1 month ago

In the home feed you should be able to hide a channel by opening the three dot flyout menu and selecting "do not recommend channel"

I can confirm then that it does not work on the home feed, hence the screenshot. Honestly idk why I'm being recommended these playlists at all, but that's the algorithm for ya.

You cannot hide or mark DNR playlists in the home feed. Thanks, google.

Screenshot_20240710-235642 (1) Screenshot as proof.

LisoUseInAIKyrios commented 1 month ago

If you turn on debugging and log protobuffer in Misc settings, then check the debug logs for the channel name (Martin Christopher), you can find how the channel name is formatted in the buffer for playlists. Maybe it's different than surrounding with dashes.

The alternative is to use just the channel name as a keyword and it will hide the playlists but also any videos with that channel name in the title.

Fern-Leaves commented 1 month ago

I have tried the - channel name - thing and it isn't filtering them out of search results for me, I am on the latest version of the patches I just updated today.

LisoUseInAIKyrios commented 1 month ago

@Fern-Leaves you must be using the wrong channel name, or you are not using the exact spacing/casing the channel uses.

For example, MrBeast channel name has no space. So - MrBeast - works but anything else will not work.

You also must use the channel name that shows in search. Provide an example channel if this still doesn't work.

Fern-Leaves commented 1 month ago

@LisoUseInAIKyrios I am, Screenshot_20240712-123839.png

Screenshot_20240712-123520.png

LisoUseInAIKyrios commented 1 month ago

@Fern-Leaves It works for me. Try incognito mode and see if it works.

Filtering off ![off](https://github.com/user-attachments/assets/9e025f83-2bf7-4669-b4e7-eb48c088a928)
Filters ![Screenshot_20240712_154540_YouTube](https://github.com/user-attachments/assets/db236264-787c-43f8-885d-f256a9556298)
Filtering on ![Screenshot_20240712_154548_YouTube](https://github.com/user-attachments/assets/bd3b9165-0af3-45c2-98b7-fbcf8b715cf6)
Fern-Leaves commented 1 month ago

@LisoUseInAIKyrios I've tried toggling ingocnito, force stopping and restarting the app, switching accounts, turning off feed and subscriptions filtering (how you had it set), none of these made it work.

cyberboh commented 1 month ago

@LisoUseInAIKyrios I've tried toggling ingocnito, force stopping and restarting the app, switching accounts, turning off feed and subscriptions filtering (how you had it set), none of these made it work.

Try switching to another Google account.

LisoUseInAIKyrios commented 1 month ago

You can turn on both debug logging (in Settings -> Misc) and proto buffer logging, capture the log files (using adb and a laptop, search online how to), then check what the buffer looks like for these channels. It's possible something is different for your YT account.

Also try using just the channel name as a keyword (no dashes), as a sanity check to verify that filters search results.

Fern-Leaves commented 1 month ago

@LisoUseInAIKyrios I have tried without the dashes and that works mostly, I just can't do that with one channel I'm trying to filter because it's just the word "Dough" and I don't want to filter random videos unrelated to that channel which are about actual dough.

I've tried a channel under a different Google account but no difference. I do know something is different about my YouTube account, in YouTube music music videos get replaced with their official music upload counterparts, this doesn't happen on other Google accounts I've tested with.

I'll try the debugging later.

Bucketsmith commented 3 weeks ago

Experiencing same issue - keyword filter does not work