Fix: "Hide videos from channels" doesn't work for collab videos (local API) - #9697
Fix: "Hide videos from channels" doesn't work for collab videos (local API)#9697Shadorc wants to merge 9 commits into
Conversation
| 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)) || |
There was a problem hiding this comment.
props.data.collaborators[0].id: Does that mean the first guy (XXX and YYY: XXX) or 2nd one (YYY`)
There was a problem hiding this comment.
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'...] }
There was a problem hiding this comment.
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
There was a problem hiding this comment.
I'm not sure why it is decided like this, but this behavior was described here #7871 (comment)
There was a problem hiding this comment.
@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
There was a problem hiding this comment.
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
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
cc383c4 to
50c0437
Compare
|
Conflicts have been resolved. A maintainer will review the pull request shortly. |
|
Please merge instead of force push next time |
PikachuEXE
left a comment
There was a problem hiding this comment.
I got no IV to test so I will let others test that (If they can
|
@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 |
Pull Request Type
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:
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
Recommended videos and next recommended video
Trending page
Desktop
Additional Information
local#parseLocalCollaboratorscould 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.