From 2fb5b3a55aeebcc77f4b3a0c029bbf0738ef0063 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 Apr 2019 09:56:25 +0200 Subject: Relax videos list thumbnail api join --- server/models/video/video.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'server/models/video') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 18f18795e..5fb529e8d 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -239,6 +239,11 @@ type AvailableForListIDsOptions = { { model: VideoChannelModel.scope({ method: [ VideoChannelScopeNames.SUMMARY, true ] }), required: true + }, + { + attributes: [ 'type', 'filename' ], + model: ThumbnailModel, + required: false } ] } @@ -1599,7 +1604,7 @@ export class VideoModel extends Model { ] } - const apiScope: (string | ScopeOptions)[] = [ ScopeNames.WITH_THUMBNAILS ] + const apiScope: (string | ScopeOptions)[] = [] if (options.user) { apiScope.push({ method: [ ScopeNames.WITH_USER_HISTORY, options.user.id ] }) -- cgit v1.2.3