1
0
Fork 0

Don't break video scheduled publication

This commit is contained in:
Chocobozzz 2019-06-07 15:37:36 +02:00
parent b91bc1d1f3
commit 12bec528aa
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 10 additions and 8 deletions

View file

@ -10,6 +10,7 @@ import { isDefaultLocale, peertubeTranslate } from '../../../../../shared/models
import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils'
import { sortBy } from '@app/shared/misc/utils'
import { VideoPlaylistPrivacy } from '@shared/models/videos/playlist/video-playlist-privacy.model'
import { cloneDeep } from 'lodash-es'
@Injectable()
export class ServerService {
@ -160,27 +161,27 @@ export class ServerService {
}
getConfig () {
return this.config
return cloneDeep(this.config)
}
getVideoCategories () {
return this.videoCategories
return cloneDeep(this.videoCategories)
}
getVideoLicences () {
return this.videoLicences
return cloneDeep(this.videoLicences)
}
getVideoLanguages () {
return this.videoLanguages
return cloneDeep(this.videoLanguages)
}
getVideoPrivacies () {
return this.videoPrivacies
return cloneDeep(this.videoPrivacies)
}
getVideoPlaylistPrivacies () {
return this.videoPlaylistPrivacies
return cloneDeep(this.videoPlaylistPrivacies)
}
private loadAttributeEnum (

View file

@ -91,8 +91,6 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, CanCom
previewUrl: null
}))
this.explainedVideoPrivacies = this.videoService.explainedPrivacyLabels(this.videoPrivacies)
this.hydrateFormFromVideo()
},

View file

@ -12,6 +12,7 @@ import { FormValidatorService } from '@app/shared/forms/form-validators/form-val
import { VideoCaptionService } from '@app/shared/video-caption'
import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model'
import { VideoDetails } from '@app/shared/video/video-details.model'
import { VideoPrivacy } from '@shared/models'
@Component({
selector: 'my-videos-update',
@ -53,6 +54,8 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
this.userVideoChannels = videoChannels
this.videoCaptions = videoCaptions
this.schedulePublicationPossible = this.video.privacy === VideoPrivacy.PRIVATE
const videoFiles = (video as VideoDetails).files
if (videoFiles.length > 1) { // Already transcoded
this.waitTranscodingEnabled = false