aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/video.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 70839aa89..f3055a494 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -988,6 +988,19 @@ export class VideoModel extends Model<VideoModel> {
988 }) 988 })
989 } 989 }
990 990
991 static listPublishedLiveIds () {
992 const options = {
993 attributes: [ 'id' ],
994 where: {
995 isLive: true,
996 state: VideoState.PUBLISHED
997 }
998 }
999
1000 return VideoModel.findAll(options)
1001 .map(v => v.id)
1002 }
1003
991 static listUserVideosForApi ( 1004 static listUserVideosForApi (
992 accountId: number, 1005 accountId: number,
993 start: number, 1006 start: number,