import { FormValidatorService } from '@app/shared/shared-forms'
import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main'
import { LoadingBarService } from '@ngx-loading-bar/core'
-import { PeerTubeProblemDocument, ServerErrorCode, VideoPrivacy, VideoUpdate } from '@shared/models'
+import { PeerTubeProblemDocument, ServerErrorCode, VideoUpdate } from '@shared/models'
import { hydrateFormFromVideo } from '../shared/video-edit-utils'
import { VideoSend } from './video-send'
private router: Router,
private videoImportService: VideoImportService,
private hooks: HooksService
- ) {
+ ) {
super()
}
const videoUpdate: VideoUpdate = {
privacy: this.highestPrivacy,
waitTranscoding: false,
- commentsEnabled: true,
- downloadEnabled: true,
channelId: this.firstStepChannelId
}
})
}
- updateSecondStep () {
- if (this.checkForm() === false) {
- return
- }
+ async updateSecondStep () {
+ if (!await this.isFormValid()) return
this.video.patch(this.form.value)