From: Chocobozzz Date: Fri, 20 Mar 2020 08:55:57 +0000 (+0100) Subject: Fix internal videos in playlists X-Git-Tag: v2.2.0-rc.1~334 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5db4545cd2af2298ef6514dde2c36edc98ef5e33;p=oweals%2Fpeertube.git Fix internal videos in playlists --- diff --git a/server/models/video/video-playlist-element.ts b/server/models/video/video-playlist-element.ts index 4ba16f5fd..9ea73e82e 100644 --- a/server/models/video/video-playlist-element.ts +++ b/server/models/video/video-playlist-element.ts @@ -309,7 +309,10 @@ export class VideoPlaylistElementModel extends Model // Owned video, don't filter it if (accountId && video.VideoChannel.Account.id === accountId) return VideoPlaylistElementType.REGULAR - if (video.privacy === VideoPrivacy.PRIVATE) return VideoPlaylistElementType.PRIVATE + // Internal video? + if (video.privacy === VideoPrivacy.INTERNAL && accountId) return VideoPlaylistElementType.REGULAR + + if (video.privacy === VideoPrivacy.PRIVATE || video.privacy === VideoPrivacy.INTERNAL) return VideoPlaylistElementType.PRIVATE if (video.isBlacklisted() || video.isBlocked()) return VideoPlaylistElementType.UNAVAILABLE if (video.nsfw === true && displayNSFW === false) return VideoPlaylistElementType.UNAVAILABLE