diff options
Diffstat (limited to 'server/models/video/video-playlist.ts')
-rw-r--r-- | server/models/video/video-playlist.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/models/video/video-playlist.ts b/server/models/video/video-playlist.ts index 63b4a0715..61ff78bd2 100644 --- a/server/models/video/video-playlist.ts +++ b/server/models/video/video-playlist.ts | |||
@@ -33,7 +33,7 @@ import { | |||
33 | WEBSERVER | 33 | WEBSERVER |
34 | } from '../../initializers/constants' | 34 | } from '../../initializers/constants' |
35 | import { VideoPlaylist } from '../../../shared/models/videos/playlist/video-playlist.model' | 35 | import { VideoPlaylist } from '../../../shared/models/videos/playlist/video-playlist.model' |
36 | import { AccountModel, ScopeNames as AccountScopeNames } from '../account/account' | 36 | import { AccountModel, ScopeNames as AccountScopeNames, SummaryOptions } from '../account/account' |
37 | import { ScopeNames as VideoChannelScopeNames, VideoChannelModel } from './video-channel' | 37 | import { ScopeNames as VideoChannelScopeNames, VideoChannelModel } from './video-channel' |
38 | import { join } from 'path' | 38 | import { join } from 'path' |
39 | import { VideoPlaylistElementModel } from './video-playlist-element' | 39 | import { VideoPlaylistElementModel } from './video-playlist-element' |
@@ -115,7 +115,7 @@ type AvailableForListOptions = { | |||
115 | [ ScopeNames.AVAILABLE_FOR_LIST ]: (options: AvailableForListOptions) => { | 115 | [ ScopeNames.AVAILABLE_FOR_LIST ]: (options: AvailableForListOptions) => { |
116 | // Only list local playlists OR playlists that are on an instance followed by actorId | 116 | // Only list local playlists OR playlists that are on an instance followed by actorId |
117 | const inQueryInstanceFollow = buildServerIdsFollowedBy(options.followerActorId) | 117 | const inQueryInstanceFollow = buildServerIdsFollowedBy(options.followerActorId) |
118 | const actorWhere = { | 118 | const whereActor = { |
119 | [ Op.or ]: [ | 119 | [ Op.or ]: [ |
120 | { | 120 | { |
121 | serverId: null | 121 | serverId: null |
@@ -159,7 +159,7 @@ type AvailableForListOptions = { | |||
159 | } | 159 | } |
160 | 160 | ||
161 | const accountScope = { | 161 | const accountScope = { |
162 | method: [ AccountScopeNames.SUMMARY, actorWhere ] | 162 | method: [ AccountScopeNames.SUMMARY, { whereActor } as SummaryOptions ] |
163 | } | 163 | } |
164 | 164 | ||
165 | return { | 165 | return { |
@@ -341,7 +341,7 @@ export class VideoPlaylistModel extends Model<VideoPlaylistModel> { | |||
341 | }, | 341 | }, |
342 | include: [ | 342 | include: [ |
343 | { | 343 | { |
344 | attributes: [ 'videoId', 'startTimestamp', 'stopTimestamp' ], | 344 | attributes: [ 'id', 'videoId', 'startTimestamp', 'stopTimestamp' ], |
345 | model: VideoPlaylistElementModel.unscoped(), | 345 | model: VideoPlaylistElementModel.unscoped(), |
346 | where: { | 346 | where: { |
347 | videoId: { | 347 | videoId: { |