PeerTube/shared/models/redundancy/videos-redundancy.model.ts

23 lines
537 B
TypeScript

export type VideoRedundancyStrategy = 'most-views' | 'trending' | 'recently-added'
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