aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/redundancy/video-redundancy.ts7
-rw-r--r--server/models/video/video-file.ts2
2 files changed, 6 insertions, 3 deletions
diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts
index 1c8b2cf78..1b967996c 100644
--- a/server/models/redundancy/video-redundancy.ts
+++ b/server/models/redundancy/video-redundancy.ts
@@ -268,7 +268,8 @@ export class VideoRedundancyModel extends Model<VideoRedundancyModel> {
268 limit: randomizedFactor, 268 limit: randomizedFactor,
269 order: getVideoSort('-views'), 269 order: getVideoSort('-views'),
270 where: { 270 where: {
271 privacy: VideoPrivacy.PUBLIC 271 privacy: VideoPrivacy.PUBLIC,
272 isLive: false
272 }, 273 },
273 include: [ 274 include: [
274 await VideoRedundancyModel.buildVideoFileForDuplication(), 275 await VideoRedundancyModel.buildVideoFileForDuplication(),
@@ -288,7 +289,8 @@ export class VideoRedundancyModel extends Model<VideoRedundancyModel> {
288 limit: randomizedFactor, 289 limit: randomizedFactor,
289 order: getVideoSort('-trending'), 290 order: getVideoSort('-trending'),
290 where: { 291 where: {
291 privacy: VideoPrivacy.PUBLIC 292 privacy: VideoPrivacy.PUBLIC,
293 isLive: false
292 }, 294 },
293 include: [ 295 include: [
294 await VideoRedundancyModel.buildVideoFileForDuplication(), 296 await VideoRedundancyModel.buildVideoFileForDuplication(),
@@ -309,6 +311,7 @@ export class VideoRedundancyModel extends Model<VideoRedundancyModel> {
309 order: getVideoSort('-publishedAt'), 311 order: getVideoSort('-publishedAt'),
310 where: { 312 where: {
311 privacy: VideoPrivacy.PUBLIC, 313 privacy: VideoPrivacy.PUBLIC,
314 isLive: false,
312 views: { 315 views: {
313 [Op.gte]: minViews 316 [Op.gte]: minViews
314 } 317 }
diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts
index 0e834aee0..a130317f6 100644
--- a/server/models/video/video-file.ts
+++ b/server/models/video/video-file.ts
@@ -334,7 +334,7 @@ export class VideoFileModel extends Model<VideoFileModel> {
334 } 334 }
335 335
336 isHLS () { 336 isHLS () {
337 return this.videoStreamingPlaylistId !== null 337 return !!this.videoStreamingPlaylistId
338 } 338 }
339 339
340 hasSameUniqueKeysThan (other: MVideoFile) { 340 hasSameUniqueKeysThan (other: MVideoFile) {