Skip to content

Commit

Permalink
! Fix license data reading code causing some videos cannot be played (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuEXE authored Jan 31, 2025
1 parent ec02f1f commit bfa22f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bfa22f4

Please sign in to comment.