diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-14 11:05:38 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-14 11:05:38 +0200 |
commit | 3f6b6a565dc98a658ec9d8f697252788c0faa46d (patch) | |
tree | 9549d3722b2d2d6501d85b4a56e6bfd3ea14fed3 /shared/models/redundancy | |
parent | 780daa7e91336116a5163156f298c9ad875ec1e3 (diff) | |
download | PeerTube-3f6b6a565dc98a658ec9d8f697252788c0faa46d.tar.gz PeerTube-3f6b6a565dc98a658ec9d8f697252788c0faa46d.tar.zst PeerTube-3f6b6a565dc98a658ec9d8f697252788c0faa46d.zip |
Add recently added redundancy strategy
Diffstat (limited to 'shared/models/redundancy')
-rw-r--r-- | shared/models/redundancy/videos-redundancy.model.ts | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/shared/models/redundancy/videos-redundancy.model.ts b/shared/models/redundancy/videos-redundancy.model.ts index 85982e5b3..436394c1e 100644 --- a/shared/models/redundancy/videos-redundancy.model.ts +++ b/shared/models/redundancy/videos-redundancy.model.ts | |||
@@ -1,6 +1,19 @@ | |||
1 | export type VideoRedundancyStrategy = 'most-views' | 'trending' | 1 | export type VideoRedundancyStrategy = 'most-views' | 'trending' | 'recently-added' |
2 | 2 | ||
3 | export interface VideosRedundancy { | 3 | export type MostViewsRedundancyStrategy = { |
4 | strategy: VideoRedundancyStrategy | 4 | strategy: 'most-views' |
5 | size: number | 5 | size: number |
6 | } | 6 | } |
7 | |||
8 | export type TrendingRedundancyStrategy = { | ||
9 | strategy: 'trending' | ||
10 | size: number | ||
11 | } | ||
12 | |||
13 | export type RecentlyAddedStrategy = { | ||
14 | strategy: 'recently-added' | ||
15 | size: number | ||
16 | minViews: number | ||
17 | } | ||
18 | |||
19 | export type VideosRedundancy = MostViewsRedundancyStrategy | TrendingRedundancyStrategy | RecentlyAddedStrategy | ||