From 15e9d5ca39e0b792f61453fbf3885a0fc446afa7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 12 Mar 2019 11:40:42 +0100 Subject: Playlist reorder support --- server/models/video/video.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'server/models') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 06c63e87c..7624b0649 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -240,7 +240,10 @@ type AvailableForListIDsOptions = { if (options.videoPlaylistId) { query.include.push({ model: VideoPlaylistElementModel.unscoped(), - required: true + required: true, + where: { + videoPlaylistId: options.videoPlaylistId + } }) } @@ -304,6 +307,8 @@ type AvailableForListIDsOptions = { videoPlaylistId: options.videoPlaylistId } }) + + query.subQuery = false } if (options.filter || options.accountId || options.videoChannelId) { -- cgit v1.2.3