aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-03-20 09:55:57 +0100
committerChocobozzz <me@florianbigard.com>2020-03-20 09:55:57 +0100
commit5db4545cd2af2298ef6514dde2c36edc98ef5e33 (patch)
tree655d16e161dedcfcab60e13476cc27efbd945e5e
parent3596a4183664cfd05db92bc52abc4178d50702b5 (diff)
downloadPeerTube-5db4545cd2af2298ef6514dde2c36edc98ef5e33.tar.gz
PeerTube-5db4545cd2af2298ef6514dde2c36edc98ef5e33.tar.zst
PeerTube-5db4545cd2af2298ef6514dde2c36edc98ef5e33.zip
Fix internal videos in playlists
-rw-r--r--server/models/video/video-playlist-element.ts5
1 files changed, 4 insertions, 1 deletions
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<VideoPlaylistElementModel>
309 // Owned video, don't filter it 309 // Owned video, don't filter it
310 if (accountId && video.VideoChannel.Account.id === accountId) return VideoPlaylistElementType.REGULAR 310 if (accountId && video.VideoChannel.Account.id === accountId) return VideoPlaylistElementType.REGULAR
311 311
312 if (video.privacy === VideoPrivacy.PRIVATE) return VideoPlaylistElementType.PRIVATE 312 // Internal video?
313 if (video.privacy === VideoPrivacy.INTERNAL && accountId) return VideoPlaylistElementType.REGULAR
314
315 if (video.privacy === VideoPrivacy.PRIVATE || video.privacy === VideoPrivacy.INTERNAL) return VideoPlaylistElementType.PRIVATE
313 316
314 if (video.isBlacklisted() || video.isBlocked()) return VideoPlaylistElementType.UNAVAILABLE 317 if (video.isBlacklisted() || video.isBlocked()) return VideoPlaylistElementType.UNAVAILABLE
315 if (video.nsfw === true && displayNSFW === false) return VideoPlaylistElementType.UNAVAILABLE 318 if (video.nsfw === true && displayNSFW === false) return VideoPlaylistElementType.UNAVAILABLE