diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.html b/client/src/app/+videos/+video-edit/shared/video-edit.component.html index 57dcd2b2e..33a6c041a 100644 --- a/client/src/app/+videos/+video-edit/shared/video-edit.component.html +++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.html @@ -184,7 +184,7 @@ {{ videoCaption.language.label }} + >{{ getCaptionLabel(videoCaption) }}
Already uploaded on {{ videoCaption.updatedAt | date }} ✔
@@ -193,7 +193,7 @@ - {{ videoCaption.language.label }} + {{ getCaptionLabel(videoCaption) }}
Will be created on update
@@ -201,7 +201,7 @@
- {{ videoCaption.language.label }} + {{ getCaptionLabel(videoCaption) }}
Will be edited on update
@@ -209,7 +209,7 @@
- {{ videoCaption.language.label }} + {{ getCaptionLabel(videoCaption) }}
Will be deleted on update
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 5469b7fa8..711111a6b 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 @@ -348,6 +348,14 @@ export class VideoEditComponent implements OnInit, OnDestroy { // --------------------------------------------------------------------------- + getCaptionLabel (caption: VideoCaptionWithPathEdit) { + if (caption.automaticallyGenerated) { + return $localize`${caption.language.label} (auto-generated)` + } + + return caption.language.label + } + getExistingCaptions () { return this.videoCaptions .filter(c => c.action !== 'REMOVE') diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts index 0bc0ac728..40547bc15 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts @@ -768,6 +768,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { const playerCaptions = videoCaptions.map(c => ({ label: c.language.label, language: c.language.id, + automaticallyGenerated: c.automaticallyGenerated, src: environment.apiUrl + c.captionPath })) diff --git a/client/src/app/shared/shared-main/video-caption/video-caption-edit.model.ts b/client/src/app/shared/shared-main/video-caption/video-caption-edit.model.ts index 8d578cae6..08a9587d7 100644 --- a/client/src/app/shared/shared-main/video-caption/video-caption-edit.model.ts +++ b/client/src/app/shared/shared-main/video-caption/video-caption-edit.model.ts @@ -4,6 +4,8 @@ export interface VideoCaptionEdit { label?: string } + automaticallyGenerated?: boolean + action?: 'CREATE' | 'REMOVE' | 'UPDATE' captionfile?: any updatedAt?: string diff --git a/client/src/app/shared/shared-video-miniature/video-download.component.html b/client/src/app/shared/shared-video-miniature/video-download.component.html index ced76fbe8..618d22178 100644 --- a/client/src/app/shared/shared-video-miniature/video-download.component.html +++ b/client/src/app/shared/shared-video-miniature/video-download.component.html @@ -26,7 +26,11 @@