1
0
Fork 0

Add ability to list redundancies

This commit is contained in:
Chocobozzz 2020-01-10 10:11:28 +01:00 committed by Chocobozzz
parent 3ae0bbd23c
commit b764380ac2
64 changed files with 1807 additions and 195 deletions

View file

@ -1 +1,3 @@
export * from './videos-redundancy.model'
export * from './videos-redundancy-strategy.model'
export * from './video-redundancies-filters.model'
export * from './video-redundancy.model'

View file

@ -0,0 +1 @@
export type VideoRedundanciesTarget = 'my-videos' | 'remote-videos'

View file

@ -0,0 +1,33 @@
export interface VideoRedundancy {
id: number
name: string
url: string
uuid: string
redundancies: {
files: FileRedundancyInformation[]
streamingPlaylists: StreamingPlaylistRedundancyInformation[]
}
}
interface RedundancyInformation {
id: number
fileUrl: string
strategy: string
createdAt: Date | string
updatedAt: Date | string
expiresOn: Date | string
size: number
}
export interface FileRedundancyInformation extends RedundancyInformation {
}
export interface StreamingPlaylistRedundancyInformation extends RedundancyInformation {
}

View file

@ -1,4 +1,5 @@
export type VideoRedundancyStrategy = 'most-views' | 'trending' | 'recently-added'
export type VideoRedundancyStrategyWithManual = VideoRedundancyStrategy | 'manual'
export type MostViewsRedundancyStrategy = {
strategy: 'most-views'
@ -19,4 +20,4 @@ export type RecentlyAddedStrategy = {
minLifetime: number
}
export type VideosRedundancy = MostViewsRedundancyStrategy | TrendingRedundancyStrategy | RecentlyAddedStrategy
export type VideosRedundancyStrategy = MostViewsRedundancyStrategy | TrendingRedundancyStrategy | RecentlyAddedStrategy