import { FormReactiveValidationMessages, FormValidatorService } from '@app/shared/shared-forms'
import { InstanceService } from '@app/shared/shared-instance'
import { VideoCaptionEdit, VideoCaptionWithPathEdit, VideoEdit, VideoService } from '@app/shared/shared-main'
+import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
+import { logger } from '@root-helpers/logger'
import { PluginInfo } from '@root-helpers/plugins-manager'
import {
HTMLServerConfig,
VideoDetails,
VideoPrivacy
} from '@shared/models'
+import { VideoSource } from '@shared/models/videos/video-source'
import { I18nPrimengCalendarService } from './i18n-primeng-calendar.service'
import { VideoCaptionAddModalComponent } from './video-caption-add-modal.component'
import { VideoCaptionEditModalContentComponent } from './video-caption-edit-modal-content/video-caption-edit-modal-content.component'
import { VideoEditType } from './video-edit.type'
-import { VideoSource } from '@shared/models/videos/video-source'
-import { logger } from '@root-helpers/logger'
-import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
type VideoLanguages = VideoConstant<string> & { group?: string }
type PluginField = {
@Input() videoCaptions: VideoCaptionWithPathEdit[] = []
@Input() videoSource: VideoSource
- @Input() waitTranscodingEnabled = true
+ @Input() hideWaitTranscoding = false
+
@Input() type: VideoEditType
@Input() liveVideo: LiveVideo
nsfw: 'false',
commentsEnabled: this.serverConfig.defaults.publish.commentsEnabled,
downloadEnabled: this.serverConfig.defaults.publish.downloadEnabled,
- waitTranscoding: 'true',
+ waitTranscoding: true,
licence: this.serverConfig.defaults.publish.licence,
tags: []
}
<my-video-edit
[form]="form" [formErrors]="formErrors" [forbidScheduledPublication]="forbidScheduledPublication"
[validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels"
- [videoCaptions]="videoCaptions" [waitTranscodingEnabled]="isWaitTranscodingEnabled()"
+ [videoCaptions]="videoCaptions" [hideWaitTranscoding]="isWaitTranscodingHidden()"
type="update" (pluginFieldsAdded)="hydratePluginFieldsFromVideo()"
[liveVideo]="liveVideo" [videoToUpdate]="videoDetails"
[videoSource]="videoSource"
isUpdatingVideo = false
forbidScheduledPublication = false
- waitTranscodingEnabled = true
private updateDone = false
return { canDeactivate: this.formChanged === false, text }
}
- isWaitTranscodingEnabled () {
+ isWaitTranscodingHidden () {
if (this.videoDetails.getFiles().length > 1) { // Already transcoded
- return false
+ return true
}
- if (this.liveVideo && this.form.value['saveReplay'] !== true) {
- return false
- }
-
- return true
+ return false
}
async update () {