Skip to content
Draft
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 @@ -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
}
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 @@ -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))))
Expand Down
9 changes: 9 additions & 0 deletions src/renderer/helpers/api/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
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 @@ -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))
Expand Down