diff options
Diffstat (limited to 'client/src/app/shared')
-rw-r--r-- | client/src/app/shared/video/video-edit.model.ts | 4 | ||||
-rw-r--r-- | client/src/app/shared/video/video.service.ts | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/client/src/app/shared/video/video-edit.model.ts b/client/src/app/shared/video/video-edit.model.ts index 78aed4f9f..8562f8d25 100644 --- a/client/src/app/shared/video/video-edit.model.ts +++ b/client/src/app/shared/video/video-edit.model.ts | |||
@@ -55,7 +55,7 @@ export class VideoEdit implements VideoUpdate { | |||
55 | }) | 55 | }) |
56 | 56 | ||
57 | // If schedule publication, the video is private and will be changed to public privacy | 57 | // If schedule publication, the video is private and will be changed to public privacy |
58 | if (values['schedulePublicationAt']) { | 58 | if (parseInt(values['privacy'], 10) === VideoEdit.SPECIAL_SCHEDULED_PRIVACY) { |
59 | const updateAt = (values['schedulePublicationAt'] as Date) | 59 | const updateAt = (values['schedulePublicationAt'] as Date) |
60 | updateAt.setSeconds(0) | 60 | updateAt.setSeconds(0) |
61 | 61 | ||
@@ -64,6 +64,8 @@ export class VideoEdit implements VideoUpdate { | |||
64 | updateAt: updateAt.toISOString(), | 64 | updateAt: updateAt.toISOString(), |
65 | privacy: VideoPrivacy.PUBLIC | 65 | privacy: VideoPrivacy.PUBLIC |
66 | } | 66 | } |
67 | } else { | ||
68 | this.scheduleUpdate = null | ||
67 | } | 69 | } |
68 | } | 70 | } |
69 | 71 | ||
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts index 3af90e7ad..2da36ff1b 100644 --- a/client/src/app/shared/video/video.service.ts +++ b/client/src/app/shared/video/video.service.ts | |||
@@ -68,6 +68,7 @@ export class VideoService { | |||
68 | const category = video.category || null | 68 | const category = video.category || null |
69 | const description = video.description || null | 69 | const description = video.description || null |
70 | const support = video.support || null | 70 | const support = video.support || null |
71 | const scheduleUpdate = video.scheduleUpdate || null | ||
71 | 72 | ||
72 | const body: VideoUpdate = { | 73 | const body: VideoUpdate = { |
73 | name: video.name, | 74 | name: video.name, |
@@ -84,7 +85,7 @@ export class VideoService { | |||
84 | commentsEnabled: video.commentsEnabled, | 85 | commentsEnabled: video.commentsEnabled, |
85 | thumbnailfile: video.thumbnailfile, | 86 | thumbnailfile: video.thumbnailfile, |
86 | previewfile: video.previewfile, | 87 | previewfile: video.previewfile, |
87 | scheduleUpdate: video.scheduleUpdate || undefined | 88 | scheduleUpdate |
88 | } | 89 | } |
89 | 90 | ||
90 | const data = objectToFormData(body) | 91 | const data = objectToFormData(body) |