aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/models/videos/video-create.model.ts6
-rw-r--r--shared/models/videos/video-schedule-update.model.ts6
-rw-r--r--shared/models/videos/video-update.model.ts6
-rw-r--r--shared/models/videos/video.model.ts6
4 files changed, 12 insertions, 12 deletions
diff --git a/shared/models/videos/video-create.model.ts b/shared/models/videos/video-create.model.ts
index 531eafe54..190d63783 100644
--- a/shared/models/videos/video-create.model.ts
+++ b/shared/models/videos/video-create.model.ts
@@ -1,4 +1,5 @@
1import { VideoPrivacy } from './video-privacy.enum' 1import { VideoPrivacy } from './video-privacy.enum'
2import { VideoScheduleUpdate } from './video-schedule-update.model'
2 3
3export interface VideoCreate { 4export interface VideoCreate {
4 category?: number 5 category?: number
@@ -13,8 +14,5 @@ export interface VideoCreate {
13 tags?: string[] 14 tags?: string[]
14 commentsEnabled?: boolean 15 commentsEnabled?: boolean
15 privacy: VideoPrivacy 16 privacy: VideoPrivacy
16 scheduleUpdate?: { 17 scheduleUpdate?: VideoScheduleUpdate
17 updateAt: Date
18 privacy?: VideoPrivacy.PUBLIC | VideoPrivacy.UNLISTED
19 }
20} 18}
diff --git a/shared/models/videos/video-schedule-update.model.ts b/shared/models/videos/video-schedule-update.model.ts
new file mode 100644
index 000000000..b865c1614
--- /dev/null
+++ b/shared/models/videos/video-schedule-update.model.ts
@@ -0,0 +1,6 @@
1import { VideoPrivacy } from './video-privacy.enum'
2
3export interface VideoScheduleUpdate {
4 updateAt: Date | string
5 privacy?: VideoPrivacy.PUBLIC | VideoPrivacy.UNLISTED // Cannot schedule an update to PRIVATE
6}
diff --git a/shared/models/videos/video-update.model.ts b/shared/models/videos/video-update.model.ts
index fc0df6810..ed141a824 100644
--- a/shared/models/videos/video-update.model.ts
+++ b/shared/models/videos/video-update.model.ts
@@ -1,4 +1,5 @@
1import { VideoPrivacy } from './video-privacy.enum' 1import { VideoPrivacy } from './video-privacy.enum'
2import { VideoScheduleUpdate } from './video-schedule-update.model'
2 3
3export interface VideoUpdate { 4export interface VideoUpdate {
4 name?: string 5 name?: string
@@ -15,8 +16,5 @@ export interface VideoUpdate {
15 channelId?: number 16 channelId?: number
16 thumbnailfile?: Blob 17 thumbnailfile?: Blob
17 previewfile?: Blob 18 previewfile?: Blob
18 scheduleUpdate?: { 19 scheduleUpdate?: VideoScheduleUpdate
19 updateAt: Date
20 privacy?: VideoPrivacy
21 }
22} 20}
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts
index 676354ce3..f88f381cb 100644
--- a/shared/models/videos/video.model.ts
+++ b/shared/models/videos/video.model.ts
@@ -3,6 +3,7 @@ import { 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'
5import { VideoPrivacy } from './video-privacy.enum' 5import { VideoPrivacy } from './video-privacy.enum'
6import { VideoScheduleUpdate } from './video-schedule-update.model'
6 7
7export interface VideoConstant <T> { 8export interface VideoConstant <T> {
8 id: T 9 id: T
@@ -43,10 +44,7 @@ export interface Video {
43 44
44 waitTranscoding?: boolean 45 waitTranscoding?: boolean
45 state?: VideoConstant<VideoState> 46 state?: VideoConstant<VideoState>
46 scheduledUpdate?: { 47 scheduledUpdate?: VideoScheduleUpdate
47 updateAt: Date | string
48 privacy?: VideoPrivacy
49 }
50 48
51 account: { 49 account: {
52 id: number 50 id: number