aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+videos/+video-edit/shared/video-edit.component.ts')
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.ts22
1 files changed, 6 insertions, 16 deletions
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
index 5294a57a1..80b5dce46 100644
--- a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
@@ -96,22 +96,6 @@ export class VideoEditComponent implements OnInit, OnDestroy {
96 this.calendarDateFormat = this.i18nPrimengCalendarService.getDateFormat() 96 this.calendarDateFormat = this.i18nPrimengCalendarService.getDateFormat()
97 } 97 }
98 98
99 get existingCaptions () {
100 return this.videoCaptions
101 .filter(c => c.action !== 'REMOVE')
102 .map(c => c.language.id)
103 }
104
105 isWaitTranscodingDisplayed () {
106 if (!this.waitTranscodingEnabled) return false
107
108 if (this.liveVideo) {
109 return this.form.value['saveReplay'] === true
110 }
111
112 return true
113 }
114
115 updateForm () { 99 updateForm () {
116 const defaultValues: any = { 100 const defaultValues: any = {
117 nsfw: 'false', 101 nsfw: 'false',
@@ -217,6 +201,12 @@ export class VideoEditComponent implements OnInit, OnDestroy {
217 if (this.schedulerInterval) clearInterval(this.schedulerInterval) 201 if (this.schedulerInterval) clearInterval(this.schedulerInterval)
218 } 202 }
219 203
204 getExistingCaptions () {
205 return this.videoCaptions
206 .filter(c => c.action !== 'REMOVE')
207 .map(c => c.language.id)
208 }
209
220 onCaptionAdded (caption: VideoCaptionEdit) { 210 onCaptionAdded (caption: VideoCaptionEdit) {
221 const existingCaption = this.videoCaptions.find(c => c.language.id === caption.language.id) 211 const existingCaption = this.videoCaptions.find(c => c.language.id === caption.language.id)
222 212