1
0
Fork 0
peertube/shared/models/redundancy/videos-redundancy-strategy.model.ts
2020-01-28 11:35:26 +01:00

23 lines
628 B
TypeScript

export type VideoRedundancyStrategy = 'most-views' | 'trending' | 'recently-added'
export type VideoRedundancyStrategyWithManual = VideoRedundancyStrategy | 'manual'
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 VideosRedundancyStrategy = MostViewsRedundancyStrategy | TrendingRedundancyStrategy | RecentlyAddedStrategy