diff --git a/src/renderer/helpers/api/local.js b/src/renderer/helpers/api/local.js index 7aaf6c52ea8d2..e93c2f81cec30 100644 --- a/src/renderer/helpers/api/local.js +++ b/src/renderer/helpers/api/local.js @@ -1536,7 +1536,7 @@ export function parseLocalListVideo(item, channelId, channelName) { const VIEWS_OR_WATCHING_REGEX = /views?|watching|waiting/i const WAITING_REGEX = /waiting/i const VIEWS_IN_NUMBER_ONLY = /^\d+(\.\d)?[km]?$/i -const PREMIERES_TIME_REGEX = /^premieres /i +const PREMIERES_TIME_REGEX = /^(premieres|scheduled for) /i /** * @param {string | undefined} text @@ -1677,12 +1677,16 @@ function parseLockupView(lockupView, channelId = undefined, channelName = undefi } const maybeAuthorText = lockupView.metadata.metadata?.metadata_rows[0].metadata_parts?.[0].text?.text + let author = channelName + if (maybeAuthorText && !isViewOrWaitingCountText(maybeAuthorText) && !isPremieresTimeText(maybeAuthorText)) { + author = maybeAuthorText + } return { type: 'video', videoId: lockupView.content_id, title: lockupView.metadata.title.text?.trim(), - author: maybeAuthorText && !isViewOrWaitingCountText(maybeAuthorText) ? maybeAuthorText : channelName, + author, authorId: lockupView.metadata.image?.renderer_context?.command_context?.on_tap?.payload.browseId ?? channelId, viewCount, published: calculatePublishedDate(publishedText, liveNow, isUpcoming, premiereDate),