aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/redundancy
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-06 14:33:31 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-09 15:33:04 +0100
commit9e2b2e76ba5f7f570dcf59fc03bfec98ea5ffab8 (patch)
tree62717add69330345db3d7432e7218bb24d54a702 /server/models/redundancy
parent3cabf3532b9118a19311f14ca3e171d12d554a2f (diff)
downloadPeerTube-9e2b2e76ba5f7f570dcf59fc03bfec98ea5ffab8.tar.gz
PeerTube-9e2b2e76ba5f7f570dcf59fc03bfec98ea5ffab8.tar.zst
PeerTube-9e2b2e76ba5f7f570dcf59fc03bfec98ea5ffab8.zip
Don't add live videos in redundancy
Diffstat (limited to 'server/models/redundancy')
-rw-r--r--server/models/redundancy/video-redundancy.ts7
1 files changed, 5 insertions, 2 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 }