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
9 changes: 8 additions & 1 deletion src/renderer/helpers/api/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -1824,6 +1824,7 @@ function parseLockupView(lockupView, channelId = undefined, channelName = undefi
}
}
case 'SHORT':
case 'STATION':
case 'VIDEO': {
let publishedText
let lengthSeconds = ''
Expand All @@ -1839,7 +1840,8 @@ function parseLockupView(lockupView, channelId = undefined, channelName = undefi
}

/** @type {YTNodes.ThumbnailBottomOverlayView | undefined } */
const thumbnailBottomOverlayView = lockupView.content_image?.overlays?.firstOfType(YTNodes.ThumbnailBottomOverlayView)
const thumbnailBottomOverlayView = lockupView.content_image?.overlays?.firstOfType(YTNodes.ThumbnailBottomOverlayView) ??
lockupView.content_image?.primary_thumbnail?.overlays?.firstOfType(YTNodes.ThumbnailBottomOverlayView)

if (thumbnailBottomOverlayView) {
if (thumbnailBottomOverlayView.badges.some(badge => badge.badge_style === 'THUMBNAIL_OVERLAY_BADGE_STYLE_LIVE')) {
Expand Down Expand Up @@ -1901,6 +1903,11 @@ function parseLockupView(lockupView, channelId = undefined, channelName = undefi
author = maybeAuthorText
}

// I think this is only used for stations at the moment
if (author == null) {
author = lockupView.metadata?.metadata?.metadata_rows[0].metadata_parts?.[0].avatar_stack.text?.text
}

return {
type: 'video',
videoId: lockupView.content_id,
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 @@ -524,7 +524,7 @@ export default defineComponent({
this.recommendedVideos = result.watch_next_feed
?.filter((item) => {
return item.type === 'CompactVideo' || item.type === 'CompactMovie' ||
(item.type === 'LockupView' && item.content_type === 'VIDEO')
(item.type === 'LockupView' && (item.content_type === 'VIDEO' || item.content_type === 'STATION'))
})
.map(parseLocalWatchNextVideo).filter(_ => _)
// place watched recommended videos last
Expand Down