Skip to content

Fix: "Hide videos from channels" doesn't work for collab videos (local API) - #9697

Open
Shadorc wants to merge 9 commits into
FreeTubeApp:developmentfrom
Shadorc:fix/hide-channels-collabs
Open

Fix: "Hide videos from channels" doesn't work for collab videos (local API)#9697
Shadorc wants to merge 9 commits into
FreeTubeApp:developmentfrom
Shadorc:fix/hide-channels-collabs

Conversation

@Shadorc

@Shadorc Shadorc commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Addresses #7871 (only for local API).
This does not fix the issue for Invidious API as collaborators are not supported yet: iv-org/invidious#5507

Description

Fix "Hide videos from channels" setting not working with videos having collaborators.
Videos with collaborators are now hidden correctly for:

  • search results
  • recommended videos
  • next recommended video
  • trending page

Fix "Hide channel" option not appearing in the dropdown menu for videos with collaborators.

Fix video's author not having clickable URL when they have collaborators (redirect to the main author)

Tested with both Local API and Invidious

Testing

I don't know this channel but KSI does a lot of collaborations, it's easier to test.
All of these tests assume that no channels are hidden by default.

Search

  1. Search for "KSI"
  2. On a video with collaborators, click on the three dots and "Hide Channel"
  3. Check that the toast message is correct
  4. Check that all videos from KSI are correctly hidden

Recommended videos and next recommended video

  1. Search for "KSI"
  2. Click on any videos from him
  3. In the "Up Next" section, search for a KSI collab video, click on the three dots, and "Hide channel"
  4. Check that the toast message is correct
  5. Go back and forth (hiding a channel in the "Up Next" section does not refresh automatically)
  6. Check that all videos from KSI are correctly hidden

Trending page

  1. Go to "Trending"
  2. Search for a video with collaborators
  3. Click on the three dots and "Hide channel"
  4. Check that the toast message is correct
  5. Check that the video is correctly hidden

Desktop

  • OS: Bazzite
  • OS Version:
  • FreeTube version: 0.24.2-beta

Additional Information

local#parseLocalCollaborators could be completed using the sample in LuanRT/YouTube.js#1203 if #7872 is implemented.
Also, the title for #7872 is "Show at least one channel link for videos with multiple collaborators", which is implemented in this MR, however, the description talks about displaying all the authors.

@FreeTubeBot
FreeTubeBot enabled auto-merge (squash) August 26, 2026 17:14
@github-actions github-actions Bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 26, 2026
const lowerCaseAuthor = props.data.author?.toLowerCase()

if (channelsHidden.value.some(ch => ch.name === props.data.authorId) || channelsHidden.value.some(ch => ch.name === props.data.author) || (forbiddenTitles.value.some((text) => lowerCaseAuthor.includes(text)))) {
if (channelsHidden.value.some(ch => ch.name === props.data.authorId || (props.data.collaborators?.length > 0 && ch.name === props.data.collaborators[0].id)) ||

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

props.data.collaborators[0].id: Does that mean the first guy (XXX and YYY: XXX) or 2nd one (YYY`)

@Shadorc Shadorc Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Collaborators array always contains the original author as the first element

It's either (author is not a field, but you get the idea):
{ author: 'XXX', collaborators: [] }
or
{ author: null, collaborators: ['XXX', 'YYY'...] }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems a bit weird that it will only block for the main author and not secondary collaborators.

Ex:

  • Block Deji ( UCrqsNpKuDQZreGaxBL_a5Jg )
  • Go to KSI home page
  • Still see KSI and Deji videos

@Shadorc Shadorc Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why it is decided like this, but this behavior was described here #7871 (comment)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@efb4f5ff-1298-471a-8973-3d47447115dc Any chance you remember the reason? I'm thinking it was the data not being available for the other channels but it looks like the data for the other channels is available now

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could easily see people wanting to block content from e.g. MrBeast but would be interested to watch content where they are a collaborator in, especially in genres they arent publishing their content in themselves e.g. science, podcasts, business

PikachuEXE
PikachuEXE previously approved these changes Aug 26, 2026
efb4f5ff-1298-471a-8973-3d47447115dc

This comment was marked as resolved.

@github-actions github-actions Bot added PR: merge conflicts / rebase needed and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Sep 5, 2026
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@Shadorc
Shadorc requested a review from PikachuEXE September 5, 2026 12:44
@Shadorc Shadorc added the PR: waiting for review For PRs that are complete, tested, and ready for review label Sep 5, 2026
@PikachuEXE

Copy link
Copy Markdown
Member

Please merge instead of force push next time
I got no idea what commits I have checked or not on my last review now :P

@PikachuEXE PikachuEXE left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got no IV to test so I will let others test that (If they can

@Shadorc

Shadorc commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

@PikachuEXE I didn't add any new commit, I just rebased on development and fixed conflicts due to this addition: https://github.com/FreeTubeApp/FreeTube/pull/9697/changes#diff-1aca19457989280a5e13502e407ffcdf56d19e2f218256e5ab0c7487d5a73f39R1914
But I won't rebase anymore, I understand that it's not practical to review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: waiting for review For PRs that are complete, tested, and ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants