]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/models/redundancy/videos-redundancy.model.ts
Add redundancy stats
[github/Chocobozzz/PeerTube.git] / shared / models / redundancy / videos-redundancy.model.ts
index eb84964e09a8265c98b36aeafb7c4ed542a12710..436394c1e082071146331601521643f995432782 100644 (file)
@@ -1,6 +1,19 @@
-export type VideoRedundancyStrategy = 'most-views'
+export type VideoRedundancyStrategy = 'most-views' | 'trending' | 'recently-added'
 
-export interface VideosRedundancy {
-  strategy: VideoRedundancyStrategy
+export type MostViewsRedundancyStrategy = {
+  strategy: 'most-views'
   size: number
 }
+
+export type TrendingRedundancyStrategy = {
+  strategy: 'trending'
+  size: number
+}
+
+export type RecentlyAddedStrategy = {
+  strategy: 'recently-added'
+  size: number
+  minViews: number
+}
+
+export type VideosRedundancy = MostViewsRedundancyStrategy | TrendingRedundancyStrategy | RecentlyAddedStrategy