aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-playlist.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-31 15:57:32 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-08-01 09:11:04 +0200
commitbfbd912886eba17b4aa9a40dcef2fddc685d85bf (patch)
tree85e0f22980210a8ccd0888eb5e1790b152074677 /server/models/video/video-playlist.ts
parent85394ba22a07bde1dfccebf3f591a5d6dbe9df56 (diff)
downloadPeerTube-bfbd912886eba17b4aa9a40dcef2fddc685d85bf.tar.gz
PeerTube-bfbd912886eba17b4aa9a40dcef2fddc685d85bf.tar.zst
PeerTube-bfbd912886eba17b4aa9a40dcef2fddc685d85bf.zip
Fix broken playlist api
Diffstat (limited to 'server/models/video/video-playlist.ts')
-rw-r--r--server/models/video/video-playlist.ts8
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'
35import { VideoPlaylist } from '../../../shared/models/videos/playlist/video-playlist.model' 35import { VideoPlaylist } from '../../../shared/models/videos/playlist/video-playlist.model'
36import { AccountModel, ScopeNames as AccountScopeNames } from '../account/account' 36import { AccountModel, ScopeNames as AccountScopeNames, SummaryOptions } from '../account/account'
37import { ScopeNames as VideoChannelScopeNames, VideoChannelModel } from './video-channel' 37import { ScopeNames as VideoChannelScopeNames, VideoChannelModel } from './video-channel'
38import { join } from 'path' 38import { join } from 'path'
39import { VideoPlaylistElementModel } from './video-playlist-element' 39import { 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: {