Skip to content

Hide member only videos (Local API) #7208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
12 changes: 11 additions & 1 deletion src/renderer/helpers/api/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,17 @@ export function parseLocalChannelHeader(channel, onlyIdNameThumbnail = false) {
* @param {string} channelName
*/
export function parseLocalChannelVideos(videos, channelId, channelName) {
return videos.map((video) => parseLocalListVideo(video, channelId, channelName))
const parsedVideos = []

for (const video of videos) {
// `BADGE_STYLE_TYPE_MEMBERS_ONLY` used for both `members only` and `members first` videos
if (video.is(YTNodes.Video) && video.badges.some(badge => badge.style === 'BADGE_STYLE_TYPE_MEMBERS_ONLY')) {
continue
}
parsedVideos.push(parseLocalListVideo(video, channelId, channelName))
}

return parsedVideos
}

/**
Expand Down