]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/models/redundancy/videos-redundancy.model.ts
WIP plugins: install/uninstall
[github/Chocobozzz/PeerTube.git] / shared / models / redundancy / videos-redundancy.model.ts
index 85982e5b320e668b6957b31304d85a14486d8666..a8c2743c19f24142d26784d41b171050eabbf18c 100644 (file)
@@ -1,6 +1,22 @@
-export type VideoRedundancyStrategy = 'most-views' | 'trending'
+export type VideoRedundancyStrategy = 'most-views' | 'trending' | 'recently-added'
 
-export interface VideosRedundancy {
-  strategy: VideoRedundancyStrategy
+export type MostViewsRedundancyStrategy = {
+  strategy: 'most-views'
   size: number
+  minLifetime: number
 }
+
+export type TrendingRedundancyStrategy = {
+  strategy: 'trending'
+  size: number
+  minLifetime: number
+}
+
+export type RecentlyAddedStrategy = {
+  strategy: 'recently-added'
+  size: number
+  minViews: number
+  minLifetime: number
+}
+
+export type VideosRedundancy = MostViewsRedundancyStrategy | TrendingRedundancyStrategy | RecentlyAddedStrategy