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'...] }

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.

2 participants