Don't break video scheduled publication
This commit is contained in:
parent
b91bc1d1f3
commit
12bec528aa
|
@ -10,6 +10,7 @@ import { isDefaultLocale, peertubeTranslate } from '../../../../../shared/models
|
||||||
import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils'
|
import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils'
|
||||||
import { sortBy } from '@app/shared/misc/utils'
|
import { sortBy } from '@app/shared/misc/utils'
|
||||||
import { VideoPlaylistPrivacy } from '@shared/models/videos/playlist/video-playlist-privacy.model'
|
import { VideoPlaylistPrivacy } from '@shared/models/videos/playlist/video-playlist-privacy.model'
|
||||||
|
import { cloneDeep } from 'lodash-es'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ServerService {
|
export class ServerService {
|
||||||
|
@ -160,27 +161,27 @@ export class ServerService {
|
||||||
}
|
}
|
||||||
|
|
||||||
getConfig () {
|
getConfig () {
|
||||||
return this.config
|
return cloneDeep(this.config)
|
||||||
}
|
}
|
||||||
|
|
||||||
getVideoCategories () {
|
getVideoCategories () {
|
||||||
return this.videoCategories
|
return cloneDeep(this.videoCategories)
|
||||||
}
|
}
|
||||||
|
|
||||||
getVideoLicences () {
|
getVideoLicences () {
|
||||||
return this.videoLicences
|
return cloneDeep(this.videoLicences)
|
||||||
}
|
}
|
||||||
|
|
||||||
getVideoLanguages () {
|
getVideoLanguages () {
|
||||||
return this.videoLanguages
|
return cloneDeep(this.videoLanguages)
|
||||||
}
|
}
|
||||||
|
|
||||||
getVideoPrivacies () {
|
getVideoPrivacies () {
|
||||||
return this.videoPrivacies
|
return cloneDeep(this.videoPrivacies)
|
||||||
}
|
}
|
||||||
|
|
||||||
getVideoPlaylistPrivacies () {
|
getVideoPlaylistPrivacies () {
|
||||||
return this.videoPlaylistPrivacies
|
return cloneDeep(this.videoPlaylistPrivacies)
|
||||||
}
|
}
|
||||||
|
|
||||||
private loadAttributeEnum (
|
private loadAttributeEnum (
|
||||||
|
|
|
@ -91,8 +91,6 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, CanCom
|
||||||
previewUrl: null
|
previewUrl: null
|
||||||
}))
|
}))
|
||||||
|
|
||||||
this.explainedVideoPrivacies = this.videoService.explainedPrivacyLabels(this.videoPrivacies)
|
|
||||||
|
|
||||||
this.hydrateFormFromVideo()
|
this.hydrateFormFromVideo()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ import { FormValidatorService } from '@app/shared/forms/form-validators/form-val
|
||||||
import { VideoCaptionService } from '@app/shared/video-caption'
|
import { VideoCaptionService } from '@app/shared/video-caption'
|
||||||
import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model'
|
import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model'
|
||||||
import { VideoDetails } from '@app/shared/video/video-details.model'
|
import { VideoDetails } from '@app/shared/video/video-details.model'
|
||||||
|
import { VideoPrivacy } from '@shared/models'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-videos-update',
|
selector: 'my-videos-update',
|
||||||
|
@ -53,6 +54,8 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
|
||||||
this.userVideoChannels = videoChannels
|
this.userVideoChannels = videoChannels
|
||||||
this.videoCaptions = videoCaptions
|
this.videoCaptions = videoCaptions
|
||||||
|
|
||||||
|
this.schedulePublicationPossible = this.video.privacy === VideoPrivacy.PRIVATE
|
||||||
|
|
||||||
const videoFiles = (video as VideoDetails).files
|
const videoFiles = (video as VideoDetails).files
|
||||||
if (videoFiles.length > 1) { // Already transcoded
|
if (videoFiles.length > 1) { // Already transcoded
|
||||||
this.waitTranscodingEnabled = false
|
this.waitTranscodingEnabled = false
|
||||||
|
|
Loading…
Reference in New Issue