Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,9 @@ const showResult = computed(() => {
}

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

channelsHidden.value.some(ch => ch.name === props.data.author) ||
forbiddenTitles.value.some((text) => lowerCaseAuthor.includes(text))) {
// hide videos by author
return false
}
Expand Down
24 changes: 19 additions & 5 deletions src/renderer/components/FtListVideo/FtListVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ const id = ref('')
const title = ref('')
const channelName = ref(null)
const channelId = ref(null)
const collaborators = ref([])
const viewCount = ref(0)
const parsedViewCount = ref('')
const uploadedTime = ref('')
Expand Down Expand Up @@ -715,12 +716,16 @@ function handleOptionsClick(option) {
case 'openInvidiousChannel':
openExternalLink(getInvidiousChannelUrl())
break
case 'hideChannel':
hideChannel(channelName.value, channelId.value)
case 'hideChannel': {
const name = collaborators.value.length > 0 ? collaborators.value[0].name : channelName.value
hideChannel(name, channelId.value)
break
case 'unhideChannel':
unhideChannel(channelName.value, channelId.value)
}
case 'unhideChannel': {
const name = collaborators.value.length > 0 ? collaborators.value[0].name : channelName.value
unhideChannel(name, channelId.value)
break
}
}
}

Expand Down Expand Up @@ -1023,7 +1028,16 @@ function parseVideoData() {
title.value = props.data.title

channelName.value = props.data.author ?? null
channelId.value = props.data.authorId ?? null
collaborators.value = props.data.collaborators ?? []

if (props.data.authorId) {
channelId.value = props.data.authorId
} else if (collaborators.value.length > 0) {
// When video has collaborators, authorId is null and the first element in the collaborator array is the main author
channelId.value = collaborators.value[0].id
} else {
channelId.value = null
}

if ((props.data.lengthSeconds === '' || props.data.lengthSeconds === '0:00') && historyEntryExists.value) {
lengthSeconds.value = historyEntry.value.lengthSeconds
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/FtListVideoLazy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const shouldBeVisible = computed(() => {
const lowerCaseTitle = props.data.title?.toLowerCase()
const lowerCaseAuthor = props.data.author?.toLowerCase()

return !(channelsHidden.value.some(ch => ch.name === props.data.authorId) ||
return !(channelsHidden.value.some(ch => ch.name === props.data.authorId || (props.data.collaborators?.length > 0 && ch.name === props.data.collaborators[0].id)) ||
channelsHidden.value.some(ch => ch.name === props.data.author) ||
(lowerCaseTitle && forbiddenTitles.value.some((text) => lowerCaseTitle.includes(text))) ||
(hideChannelsBasedOnText.value && lowerCaseAuthor && forbiddenTitles.value.some((text) => lowerCaseAuthor.includes(text))))
Expand Down
20 changes: 20 additions & 0 deletions src/renderer/helpers/api/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,7 @@ export function parseLocalListVideo(item, channelId, channelName) {
title: video.title.text?.trim(),
author: video.author?.name ?? channelName,
authorId: (video.author?.id != null && video.author.id !== 'N/A') ? video.author.id : channelId,
collaborators: video.author == null ? [] : parseLocalCollaborators(video.author.collaborators),
viewCount: video.views.text == null ? null : extractNumberFromString(video.views.text),
published,
lengthSeconds: isLive ? '' : Utils.timeToSeconds(video.duration.text),
Expand Down Expand Up @@ -1733,6 +1734,7 @@ export function parseLocalListVideo(item, channelId, channelName) {
title: video.title.text?.trim(),
author: video.author.name !== 'N/A' ? video.author.name : channelName,
authorId: video.author.id !== 'N/A' ? video.author.id : channelId,
collaborators: parseLocalCollaborators(video.author.collaborators),
description: video.description,
viewCount,
published,
Expand Down Expand Up @@ -1909,12 +1911,20 @@ function parseLockupView(lockupView, channelId = undefined, channelName = undefi
author = lockupView.metadata?.metadata?.metadata_rows[0].metadata_parts?.[0].avatar_stack.text?.text
}

let collaborators = []
const maybeCollaborators = lockupView.metadata.image?.renderer_context?.command_context?.on_tap?.command?.inline_content?.custom_content?.items
.filter(item => item.renderer_context?.command_context?.on_tap?.metadata?.page_type === 'WEB_PAGE_TYPE_CHANNEL')
if (maybeCollaborators) {
collaborators = parseLocalCollaborators(maybeCollaborators)
}

return {
type: 'video',
videoId: lockupView.content_id,
title: lockupView.metadata.title.text?.trim(),
author,
authorId: lockupView.metadata.image?.renderer_context?.command_context?.on_tap?.payload.browseId ?? channelId,
collaborators,
viewCount,
published: calculatePublishedDate(publishedText, liveNow, isUpcoming, premiereDate),
lengthSeconds,
Expand Down Expand Up @@ -2471,6 +2481,16 @@ function parseLocalAttachment(attachment) {
}
}

/**
* @param {import('youtubei.js').YTNodes.ListItemView[]} collaborators
*/
function parseLocalCollaborators(collaborators) {
return collaborators.map(collaborator => ({
id: collaborator.renderer_context?.command_context?.on_tap?.payload?.browseId,
name: collaborator.title?.text,
}))
}

export async function getHashtagLocal(hashtag) {
const innertube = await createInnertube()
return await innertube.getHashtag(hashtag)
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -1930,7 +1930,7 @@ export default defineComponent({
},

isHiddenVideo: function (forbiddenTitles, channelsHidden, video) {
return channelsHidden.some(ch => ch.name === video.authorId) ||
return channelsHidden.some(ch => ch.name === video.authorId && (video.author.collaborators?.length > 0 && ch.name === video.author.collaborators[0].id)) ||
channelsHidden.some(ch => ch.name === video.author) ||
forbiddenTitles.some((text) => video.title?.toLowerCase().includes(text)) ||
forbiddenTitles.some((text) => video.author?.toLowerCase().includes(text))
Expand Down