diff options
author | Chocobozzz <me@florianbigard.com> | 2020-01-10 10:11:28 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-01-28 11:35:26 +0100 |
commit | b764380ac23f4e9d4677d08acdc3474c2931a16d (patch) | |
tree | 0d2c440ed8b56c35e47f2274586a11da63852086 /shared/models/redundancy/videos-redundancy-strategy.model.ts | |
parent | 3ae0bbd23c6f1b2790975328d8eae6a8317c223d (diff) | |
download | PeerTube-b764380ac23f4e9d4677d08acdc3474c2931a16d.tar.gz PeerTube-b764380ac23f4e9d4677d08acdc3474c2931a16d.tar.zst PeerTube-b764380ac23f4e9d4677d08acdc3474c2931a16d.zip |
Add ability to list redundancies
Diffstat (limited to 'shared/models/redundancy/videos-redundancy-strategy.model.ts')
-rw-r--r-- | shared/models/redundancy/videos-redundancy-strategy.model.ts | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/shared/models/redundancy/videos-redundancy-strategy.model.ts b/shared/models/redundancy/videos-redundancy-strategy.model.ts new file mode 100644 index 000000000..15409abf0 --- /dev/null +++ b/shared/models/redundancy/videos-redundancy-strategy.model.ts | |||
@@ -0,0 +1,23 @@ | |||
1 | export type VideoRedundancyStrategy = 'most-views' | 'trending' | 'recently-added' | ||
2 | export type VideoRedundancyStrategyWithManual = VideoRedundancyStrategy | 'manual' | ||
3 | |||
4 | export type MostViewsRedundancyStrategy = { | ||
5 | strategy: 'most-views' | ||
6 | size: number | ||
7 | minLifetime: number | ||
8 | } | ||
9 | |||
10 | export type TrendingRedundancyStrategy = { | ||
11 | strategy: 'trending' | ||
12 | size: number | ||
13 | minLifetime: number | ||
14 | } | ||
15 | |||
16 | export type RecentlyAddedStrategy = { | ||
17 | strategy: 'recently-added' | ||
18 | size: number | ||
19 | minViews: number | ||
20 | minLifetime: number | ||
21 | } | ||
22 | |||
23 | export type VideosRedundancyStrategy = MostViewsRedundancyStrategy | TrendingRedundancyStrategy | RecentlyAddedStrategy | ||