}
]
},
- VideoLiveModel,
+ VideoLiveModel.unscoped(),
VideoFileModel,
TagModel
]
})
}
+ static listPublishedLiveIds () {
+ const options = {
+ attributes: [ 'id' ],
+ where: {
+ isLive: true,
+ state: VideoState.PUBLISHED
+ }
+ }
+
+ return VideoModel.findAll(options)
+ .map(v => v.id)
+ }
+
static listUserVideosForApi (
accountId: number,
start: number,
videoFilesDone.add(row.VideoFiles.id)
}
- if (row.VideoFiles?.id && !videoFilesDone.has(row.VideoFiles.id)) {
- const videoFileModel = new VideoFileModel(pick(row.VideoFiles, videoFileKeys))
- videoModel.VideoFiles.push(videoFileModel)
-
- videoFilesDone.add(row.VideoFiles.id)
- }
-
if (row.VideoStreamingPlaylists?.id && !videoStreamingPlaylistMemo[row.VideoStreamingPlaylists.id]) {
const streamingPlaylist = new VideoStreamingPlaylistModel(pick(row.VideoStreamingPlaylists, videoStreamingPlaylistKeys))
streamingPlaylist.VideoFiles = []