X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fvideo%2Fvideo-edit.model.ts;h=8562f8d2540d662d8ea030a6adf08a55899c6cb8;hb=e94fc29706cd8e8fd892182d4de0a3ae80a3820f;hp=78aed4f9f8d92523f9b9d9cd42686213233f8901;hpb=fc11a44ec9d12af915ac72d8106cb934cfcdcbcd;p=github%2FChocobozzz%2FPeerTube.git 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 { }) // If schedule publication, the video is private and will be changed to public privacy - if (values['schedulePublicationAt']) { + if (parseInt(values['privacy'], 10) === VideoEdit.SPECIAL_SCHEDULED_PRIVACY) { const updateAt = (values['schedulePublicationAt'] as Date) updateAt.setSeconds(0) @@ -64,6 +64,8 @@ export class VideoEdit implements VideoUpdate { updateAt: updateAt.toISOString(), privacy: VideoPrivacy.PUBLIC } + } else { + this.scheduleUpdate = null } }