Remove private and deleted videos from watch playlist view

This commit is contained in:
Preston 2020-09-22 16:56:19 -04:00
parent 6bf54a1dd7
commit 37685de856
1 changed files with 3 additions and 1 deletions

View File

@ -284,7 +284,9 @@ export default Vue.extend({
this.channelThumbnail = result.author.avatar this.channelThumbnail = result.author.avatar
this.channelId = result.author.id this.channelId = result.author.id
this.playlistItems = result.items.map((video) => { this.playlistItems = result.items.filter((video) => {
return !(video.title === '[Private video]' || video.title === '[Deleted video]')
}).map((video) => {
if (video.author !== null) { if (video.author !== null) {
const channelName = video.author.name const channelName = video.author.name
const channelId = video.author.ref.replace(/https:\/\/(www\.)?youtube\.com\/(user|channel)\//g, '') const channelId = video.author.ref.replace(/https:\/\/(www\.)?youtube\.com\/(user|channel)\//g, '')