diff --git a/src/renderer/components/FtListLazyWrapper/FtListLazyWrapper.vue b/src/renderer/components/FtListLazyWrapper/FtListLazyWrapper.vue index b8dc00324b7fc..4ee9f79d358f7 100644 --- a/src/renderer/components/FtListLazyWrapper/FtListLazyWrapper.vue +++ b/src/renderer/components/FtListLazyWrapper/FtListLazyWrapper.vue @@ -239,8 +239,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.collaboratorIds?.length > 0 && ch.name === props.data.collaboratorIds[0])) || + channelsHidden.value.some(ch => ch.name === props.data.author) || + forbiddenTitles.value.some((text) => lowerCaseAuthor.includes(text))) { // hide videos by author return false } diff --git a/src/renderer/components/FtListVideoLazy.vue b/src/renderer/components/FtListVideoLazy.vue index e3bec8a070d0f..07fd373db7955 100644 --- a/src/renderer/components/FtListVideoLazy.vue +++ b/src/renderer/components/FtListVideoLazy.vue @@ -141,7 +141,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.collaboratorIds?.length > 0 && ch.name === props.data.collaboratorIds[0])) || 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)))) diff --git a/src/renderer/helpers/api/local.js b/src/renderer/helpers/api/local.js index c32ef7e8359c8..0106e2113b0ee 100644 --- a/src/renderer/helpers/api/local.js +++ b/src/renderer/helpers/api/local.js @@ -1456,6 +1456,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, + collaboratorIds: video.author?.collaborators ?? [], viewCount: video.views.text == null ? null : extractNumberFromString(video.views.text), published, lengthSeconds: isLive ? '' : Utils.timeToSeconds(video.duration.text), @@ -1514,6 +1515,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, + collaboratorIds: video.author.collaborators.map(collaborator => collaborator.id), description: video.description, viewCount, published, @@ -1682,12 +1684,19 @@ function parseLockupView(lockupView, channelId = undefined, channelName = undefi author = maybeAuthorText } + const maybeCollaborators = lockupView.metadata.image?.renderer_context?.command_context?.on_tap?.command?.inline_content?.custom_content?.items + let collaboratorIds = [] + if (maybeCollaborators) { + collaboratorIds = maybeCollaborators.map(item => item.renderer_context?.command_context?.on_tap?.payload?.browseId) + } + 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, + collaboratorIds, viewCount, published: calculatePublishedDate(publishedText, liveNow, isUpcoming, premiereDate), lengthSeconds, diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index 34a3742201244..bbd5637327fbd 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -1896,7 +1896,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.collaboratorIds?.length > 0 && ch.name === video.author.collaboratorIds[0])) || channelsHidden.some(ch => ch.name === video.author) || forbiddenTitles.some((text) => video.title?.toLowerCase().includes(text)) || forbiddenTitles.some((text) => video.author?.toLowerCase().includes(text))