aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/models/activitypub/objects/video-torrent-object.ts3
-rw-r--r--shared/models/videos/index.ts1
-rw-r--r--shared/models/videos/video-create.model.ts3
-rw-r--r--shared/models/videos/video-state.enum.ts4
-rw-r--r--shared/models/videos/video-update.model.ts1
-rw-r--r--shared/models/videos/video.model.ts9
6 files changed, 19 insertions, 2 deletions
diff --git a/shared/models/activitypub/objects/video-torrent-object.ts b/shared/models/activitypub/objects/video-torrent-object.ts
index 767b6a2d0..c4071a6d9 100644
--- a/shared/models/activitypub/objects/video-torrent-object.ts
+++ b/shared/models/activitypub/objects/video-torrent-object.ts
@@ -5,6 +5,7 @@ import {
5 ActivityUrlObject 5 ActivityUrlObject
6} from './common-objects' 6} from './common-objects'
7import { ActivityPubOrderedCollection } from '../activitypub-ordered-collection' 7import { ActivityPubOrderedCollection } from '../activitypub-ordered-collection'
8import { VideoState } from '../../videos'
8 9
9export interface VideoTorrentObject { 10export interface VideoTorrentObject {
10 type: 'Video' 11 type: 'Video'
@@ -19,6 +20,8 @@ export interface VideoTorrentObject {
19 views: number 20 views: number
20 sensitive: boolean 21 sensitive: boolean
21 commentsEnabled: boolean 22 commentsEnabled: boolean
23 waitTranscoding: boolean
24 state: VideoState
22 published: string 25 published: string
23 updated: string 26 updated: string
24 mediaType: 'text/markdown' 27 mediaType: 'text/markdown'
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'
13export * from './video-resolution.enum' 13export * from './video-resolution.enum'
14export * from './video-update.model' 14export * from './video-update.model'
15export * from './video.model' 15export * from './video.model'
16export * 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 @@
1export 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 @@
1import { VideoResolution } from '../../index' 1import { VideoResolution, VideoState } from '../../index'
2import { Account } from '../actors' 2import { Account } from '../actors'
3import { Avatar } from '../avatars/avatar.model' 3import { Avatar } from '../avatars/avatar.model'
4import { VideoChannel } from './video-channel.model' 4import { 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}