Fix internal videos in playlists

pull/2567/head
Chocobozzz 2020-03-20 09:55:57 +01:00
parent 3596a41836
commit 5db4545cd2
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 4 additions and 1 deletions

View File

@ -309,7 +309,10 @@ export class VideoPlaylistElementModel extends Model<VideoPlaylistElementModel>
// 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