mirror of https://github.com/Chocobozzz/PeerTube
Don't break video scheduled publication
parent
b91bc1d1f3
commit
12bec528aa
|
@ -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 (
|
||||
|
|
|
@ -91,8 +91,6 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, CanCom
|
|||
previewUrl: null
|
||||
}))
|
||||
|
||||
this.explainedVideoPrivacies = this.videoService.explainedPrivacyLabels(this.videoPrivacies)
|
||||
|
||||
this.hydrateFormFromVideo()
|
||||
},
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue