From 359a2149d6b9ebe608861ca52f79101afddc2a55 Mon Sep 17 00:00:00 2001 From: PikachuEXE Date: Fri, 31 Jan 2025 18:02:57 +0800 Subject: [PATCH] ! Fix license data reading code causing some videos cannot be played --- src/renderer/views/Watch/Watch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index f5a07005d76ad..8766736cf0ef6 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -413,7 +413,7 @@ export default defineComponent({ // extract localised title first and fall back to the not localised one this.videoTitle = result.primary_info?.title.text ?? result.basic_info.title this.videoViewCount = result.basic_info.view_count ?? (result.primary_info.view_count ? extractNumberFromString(result.primary_info.view_count.text) : null) - this.license = result.secondary_info.metadata.rows.find(element => element.title.text === 'License')?.contents[0].text + this.license = result.secondary_info.metadata.rows.find(element => element.title?.text === 'License')?.contents[0]?.text this.channelId = result.basic_info.channel_id ?? result.secondary_info.owner?.author.id this.channelName = result.basic_info.author ?? result.secondary_info.owner?.author.name