Skip to content

Commit

Permalink
Fix local API comments for age-restricted videos (#3760)
Browse files Browse the repository at this point in the history
  • Loading branch information
absidue authored Jul 11, 2023
1 parent b0239d1 commit 35074ef
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,17 @@ export default defineComponent({
this.liveChat = null
}

// region No comment detection
// For videos without any comment (comment disabled?)
// e.g. https://youtu.be/8NBSwDEf8a8
//
// `comments_entry_point_header` is null probably when comment disabled
// e.g. https://youtu.be/8NBSwDEf8a8
// However videos with comments enabled but have no comment
// are different (which is not detected here)
this.commentsEnabled = result.comments_entry_point_header != null
// endregion No comment detection

// the bypassed result is missing some of the info that we extract in the code above
// so we only overwrite the result here
// we need the bypassed result for the streaming data and the subtitles
Expand Down Expand Up @@ -667,17 +678,6 @@ export default defineComponent({
}
}

// region No comment detection
// For videos without any comment (comment disabled?)
// e.g. https://youtu.be/8NBSwDEf8a8
//
// `comments_entry_point_header` is null probably when comment disabled
// e.g. https://youtu.be/8NBSwDEf8a8
// However videos with comments enabled but have no comment
// are different (which is not detected here)
this.commentsEnabled = result.comments_entry_point_header != null
// endregion No comment detection

this.isLoading = false
this.updateTitle()
} catch (err) {
Expand Down

0 comments on commit 35074ef

Please sign in to comment.