diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-14 09:57:21 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-14 09:57:21 +0200 |
commit | b36f41ca09e92ecb30d367d91d1089a23d10d585 (patch) | |
tree | 34b7c90e17f73f37d069a2f08d60dc36fa08372f /server/lib/schedulers/videos-redundancy-scheduler.ts | |
parent | 6f0c46be8c9f4690d5e5cb758c4df6164b006f83 (diff) | |
download | PeerTube-b36f41ca09e92ecb30d367d91d1089a23d10d585.tar.gz PeerTube-b36f41ca09e92ecb30d367d91d1089a23d10d585.tar.zst PeerTube-b36f41ca09e92ecb30d367d91d1089a23d10d585.zip |
Add trending videos strategy
Diffstat (limited to 'server/lib/schedulers/videos-redundancy-scheduler.ts')
-rw-r--r-- | server/lib/schedulers/videos-redundancy-scheduler.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/lib/schedulers/videos-redundancy-scheduler.ts b/server/lib/schedulers/videos-redundancy-scheduler.ts index ee9ba1766..c1e619249 100644 --- a/server/lib/schedulers/videos-redundancy-scheduler.ts +++ b/server/lib/schedulers/videos-redundancy-scheduler.ts | |||
@@ -75,6 +75,8 @@ export class VideosRedundancyScheduler extends AbstractScheduler { | |||
75 | 75 | ||
76 | private findVideoToDuplicate (strategy: VideoRedundancyStrategy) { | 76 | private findVideoToDuplicate (strategy: VideoRedundancyStrategy) { |
77 | if (strategy === 'most-views') return VideoRedundancyModel.findMostViewToDuplicate(REDUNDANCY.VIDEOS.RANDOMIZED_FACTOR) | 77 | if (strategy === 'most-views') return VideoRedundancyModel.findMostViewToDuplicate(REDUNDANCY.VIDEOS.RANDOMIZED_FACTOR) |
78 | |||
79 | if (strategy === 'trending') return VideoRedundancyModel.findTrendingToDuplicate(REDUNDANCY.VIDEOS.RANDOMIZED_FACTOR) | ||
78 | } | 80 | } |
79 | 81 | ||
80 | private async createVideoRedundancy (strategy: VideoRedundancyStrategy, filesToDuplicate: VideoFileModel[]) { | 82 | private async createVideoRedundancy (strategy: VideoRedundancyStrategy, filesToDuplicate: VideoFileModel[]) { |