diff options
Diffstat (limited to 'shared/models/videos')
-rw-r--r-- | shared/models/videos/index.ts | 1 | ||||
-rw-r--r-- | shared/models/videos/video-create.model.ts | 3 | ||||
-rw-r--r-- | shared/models/videos/video-state.enum.ts | 4 | ||||
-rw-r--r-- | shared/models/videos/video-update.model.ts | 1 | ||||
-rw-r--r-- | shared/models/videos/video.model.ts | 9 |
5 files changed, 16 insertions, 2 deletions
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts index 14a10f5d8..9edfb559a 100644 --- a/shared/models/videos/index.ts +++ b/shared/models/videos/index.ts | |||
@@ -13,3 +13,4 @@ export * from './video-rate.type' | |||
13 | export * from './video-resolution.enum' | 13 | export * from './video-resolution.enum' |
14 | export * from './video-update.model' | 14 | export * from './video-update.model' |
15 | export * from './video.model' | 15 | export * from './video.model' |
16 | export * from './video-state.enum' | ||
diff --git a/shared/models/videos/video-create.model.ts b/shared/models/videos/video-create.model.ts index 562bc1bf2..2a1f622f6 100644 --- a/shared/models/videos/video-create.model.ts +++ b/shared/models/videos/video-create.model.ts | |||
@@ -7,7 +7,8 @@ export interface VideoCreate { | |||
7 | description?: string | 7 | description?: string |
8 | support?: string | 8 | support?: string |
9 | channelId: number | 9 | channelId: number |
10 | nsfw: boolean | 10 | nsfw?: boolean |
11 | waitTranscoding?: boolean | ||
11 | name: string | 12 | name: string |
12 | tags?: string[] | 13 | tags?: string[] |
13 | commentsEnabled?: boolean | 14 | commentsEnabled?: boolean |
diff --git a/shared/models/videos/video-state.enum.ts b/shared/models/videos/video-state.enum.ts new file mode 100644 index 000000000..625aefae1 --- /dev/null +++ b/shared/models/videos/video-state.enum.ts | |||
@@ -0,0 +1,4 @@ | |||
1 | export enum VideoState { | ||
2 | PUBLISHED = 1, | ||
3 | TO_TRANSCODE = 2 | ||
4 | } | ||
diff --git a/shared/models/videos/video-update.model.ts b/shared/models/videos/video-update.model.ts index c368d8464..681b00b18 100644 --- a/shared/models/videos/video-update.model.ts +++ b/shared/models/videos/video-update.model.ts | |||
@@ -11,6 +11,7 @@ export interface VideoUpdate { | |||
11 | tags?: string[] | 11 | tags?: string[] |
12 | commentsEnabled?: boolean | 12 | commentsEnabled?: boolean |
13 | nsfw?: boolean | 13 | nsfw?: boolean |
14 | waitTranscoding?: boolean | ||
14 | channelId?: number | 15 | channelId?: number |
15 | thumbnailfile?: Blob | 16 | thumbnailfile?: Blob |
16 | previewfile?: Blob | 17 | previewfile?: Blob |
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index 1c86545d3..857ca1fd9 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { VideoResolution } from '../../index' | 1 | import { VideoResolution, VideoState } from '../../index' |
2 | import { Account } from '../actors' | 2 | import { Account } from '../actors' |
3 | import { Avatar } from '../avatars/avatar.model' | 3 | import { Avatar } from '../avatars/avatar.model' |
4 | import { VideoChannel } from './video-channel.model' | 4 | import { VideoChannel } from './video-channel.model' |
@@ -41,6 +41,9 @@ export interface Video { | |||
41 | dislikes: number | 41 | dislikes: number |
42 | nsfw: boolean | 42 | nsfw: boolean |
43 | 43 | ||
44 | waitTranscoding?: boolean | ||
45 | state?: VideoConstant<VideoState> | ||
46 | |||
44 | account: { | 47 | account: { |
45 | id: number | 48 | id: number |
46 | uuid: string | 49 | uuid: string |
@@ -70,4 +73,8 @@ export interface VideoDetails extends Video { | |||
70 | files: VideoFile[] | 73 | files: VideoFile[] |
71 | account: Account | 74 | account: Account |
72 | commentsEnabled: boolean | 75 | commentsEnabled: boolean |
76 | |||
77 | // Not optional in details (unlike in Video) | ||
78 | waitTranscoding: boolean | ||
79 | state: VideoConstant<VideoState> | ||
73 | } | 80 | } |