aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/redundancy
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/redundancy')
-rw-r--r--server/models/redundancy/video-redundancy.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts
index 8621a5c6c..3df1c4f9c 100644
--- a/server/models/redundancy/video-redundancy.ts
+++ b/server/models/redundancy/video-redundancy.ts
@@ -237,6 +237,8 @@ export class VideoRedundancyModel extends Model<VideoRedundancyModel> {
237 237
238 static async getVideoSample (p: Bluebird<VideoModel[]>) { 238 static async getVideoSample (p: Bluebird<VideoModel[]>) {
239 const rows = await p 239 const rows = await p
240 if (rows.length === 0) return undefined
241
240 const ids = rows.map(r => r.id) 242 const ids = rows.map(r => r.id)
241 const id = sample(ids) 243 const id = sample(ids)
242 244
@@ -347,6 +349,7 @@ export class VideoRedundancyModel extends Model<VideoRedundancyModel> {
347 required: true, 349 required: true,
348 include: [ 350 include: [
349 { 351 {
352 required: true,
350 attributes: [], 353 attributes: [],
351 model: VideoStreamingPlaylistModel.unscoped(), 354 model: VideoStreamingPlaylistModel.unscoped(),
352 include: [ 355 include: [