aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-06-07 15:37:36 +0200
committerChocobozzz <me@florianbigard.com>2019-06-07 15:37:36 +0200
commit12bec528aafd895075e19486b87b64f0f58581ac (patch)
tree65df371a3746c371fbacc9c959ad0c60831f69b1 /client
parentb91bc1d1f3591c35ab4426f6ab594b4bd9f1ef62 (diff)
downloadPeerTube-12bec528aafd895075e19486b87b64f0f58581ac.tar.gz
PeerTube-12bec528aafd895075e19486b87b64f0f58581ac.tar.zst
PeerTube-12bec528aafd895075e19486b87b64f0f58581ac.zip
Don't break video scheduled publication
Diffstat (limited to 'client')
-rw-r--r--client/src/app/core/server/server.service.ts13
-rw-r--r--client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts2
-rw-r--r--client/src/app/videos/+video-edit/video-update.component.ts3
3 files changed, 10 insertions, 8 deletions
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts
index 3a8a535fd..689f25a40 100644
--- a/client/src/app/core/server/server.service.ts
+++ b/client/src/app/core/server/server.service.ts
@@ -10,6 +10,7 @@ import { isDefaultLocale, peertubeTranslate } from '../../../../../shared/models
10import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' 10import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils'
11import { sortBy } from '@app/shared/misc/utils' 11import { sortBy } from '@app/shared/misc/utils'
12import { VideoPlaylistPrivacy } from '@shared/models/videos/playlist/video-playlist-privacy.model' 12import { VideoPlaylistPrivacy } from '@shared/models/videos/playlist/video-playlist-privacy.model'
13import { cloneDeep } from 'lodash-es'
13 14
14@Injectable() 15@Injectable()
15export class ServerService { 16export class ServerService {
@@ -160,27 +161,27 @@ export class ServerService {
160 } 161 }
161 162
162 getConfig () { 163 getConfig () {
163 return this.config 164 return cloneDeep(this.config)
164 } 165 }
165 166
166 getVideoCategories () { 167 getVideoCategories () {
167 return this.videoCategories 168 return cloneDeep(this.videoCategories)
168 } 169 }
169 170
170 getVideoLicences () { 171 getVideoLicences () {
171 return this.videoLicences 172 return cloneDeep(this.videoLicences)
172 } 173 }
173 174
174 getVideoLanguages () { 175 getVideoLanguages () {
175 return this.videoLanguages 176 return cloneDeep(this.videoLanguages)
176 } 177 }
177 178
178 getVideoPrivacies () { 179 getVideoPrivacies () {
179 return this.videoPrivacies 180 return cloneDeep(this.videoPrivacies)
180 } 181 }
181 182
182 getVideoPlaylistPrivacies () { 183 getVideoPlaylistPrivacies () {
183 return this.videoPlaylistPrivacies 184 return cloneDeep(this.videoPlaylistPrivacies)
184 } 185 }
185 186
186 private loadAttributeEnum ( 187 private loadAttributeEnum (
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts b/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts
index 2dffdbf0e..a5578bebd 100644
--- a/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts
+++ b/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts
@@ -91,8 +91,6 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, CanCom
91 previewUrl: null 91 previewUrl: null
92 })) 92 }))
93 93
94 this.explainedVideoPrivacies = this.videoService.explainedPrivacyLabels(this.videoPrivacies)
95
96 this.hydrateFormFromVideo() 94 this.hydrateFormFromVideo()
97 }, 95 },
98 96
diff --git a/client/src/app/videos/+video-edit/video-update.component.ts b/client/src/app/videos/+video-edit/video-update.component.ts
index e990ceb13..81c66ff20 100644
--- a/client/src/app/videos/+video-edit/video-update.component.ts
+++ b/client/src/app/videos/+video-edit/video-update.component.ts
@@ -12,6 +12,7 @@ import { FormValidatorService } from '@app/shared/forms/form-validators/form-val
12import { VideoCaptionService } from '@app/shared/video-caption' 12import { VideoCaptionService } from '@app/shared/video-caption'
13import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' 13import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model'
14import { VideoDetails } from '@app/shared/video/video-details.model' 14import { VideoDetails } from '@app/shared/video/video-details.model'
15import { VideoPrivacy } from '@shared/models'
15 16
16@Component({ 17@Component({
17 selector: 'my-videos-update', 18 selector: 'my-videos-update',
@@ -53,6 +54,8 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
53 this.userVideoChannels = videoChannels 54 this.userVideoChannels = videoChannels
54 this.videoCaptions = videoCaptions 55 this.videoCaptions = videoCaptions
55 56
57 this.schedulePublicationPossible = this.video.privacy === VideoPrivacy.PRIVATE
58
56 const videoFiles = (video as VideoDetails).files 59 const videoFiles = (video as VideoDetails).files
57 if (videoFiles.length > 1) { // Already transcoded 60 if (videoFiles.length > 1) { // Already transcoded
58 this.waitTranscodingEnabled = false 61 this.waitTranscodingEnabled = false