Add ability to list redundancies
This commit is contained in:
parent
3ae0bbd23c
commit
b764380ac2
64 changed files with 1807 additions and 195 deletions
|
@ -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'
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
export type VideoRedundanciesTarget = 'my-videos' | 'remote-videos'
|
33
shared/models/redundancy/video-redundancy.model.ts
Normal file
33
shared/models/redundancy/video-redundancy.model.ts
Normal 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 {
|
||||
|
||||
}
|
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue