aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-edit/video-add-components
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/+video-edit/video-add-components')
-rw-r--r--client/src/app/videos/+video-edit/video-add-components/video-send.ts13
-rw-r--r--client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts5
2 files changed, 12 insertions, 6 deletions
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-send.ts b/client/src/app/videos/+video-edit/video-add-components/video-send.ts
index 580c123a0..b32f16950 100644
--- a/client/src/app/videos/+video-edit/video-add-components/video-send.ts
+++ b/client/src/app/videos/+video-edit/video-add-components/video-send.ts
@@ -3,7 +3,7 @@ import { LoadingBarService } from '@ngx-loading-bar/core'
3import { AuthService, Notifier, ServerService } from '@app/core' 3import { AuthService, Notifier, ServerService } from '@app/core'
4import { catchError, switchMap, tap } from 'rxjs/operators' 4import { catchError, switchMap, tap } from 'rxjs/operators'
5import { FormReactive } from '@app/shared' 5import { FormReactive } from '@app/shared'
6import { VideoConstant, VideoPrivacy } from '../../../../../../shared' 6import { ServerConfig, VideoConstant, VideoPrivacy } from '../../../../../../shared'
7import { VideoService } from '@app/shared/video/video.service' 7import { VideoService } from '@app/shared/video/video.service'
8import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' 8import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model'
9import { VideoCaptionService } from '@app/shared/video-caption' 9import { VideoCaptionService } from '@app/shared/video-caption'
@@ -29,6 +29,7 @@ export abstract class VideoSend extends FormReactive implements OnInit {
29 protected serverService: ServerService 29 protected serverService: ServerService
30 protected videoService: VideoService 30 protected videoService: VideoService
31 protected videoCaptionService: VideoCaptionService 31 protected videoCaptionService: VideoCaptionService
32 protected serverConfig: ServerConfig
32 33
33 abstract canDeactivate (): CanComponentDeactivateResult 34 abstract canDeactivate (): CanComponentDeactivateResult
34 35
@@ -38,10 +39,14 @@ export abstract class VideoSend extends FormReactive implements OnInit {
38 populateAsyncUserVideoChannels(this.authService, this.userVideoChannels) 39 populateAsyncUserVideoChannels(this.authService, this.userVideoChannels)
39 .then(() => this.firstStepChannelId = this.userVideoChannels[ 0 ].id) 40 .then(() => this.firstStepChannelId = this.userVideoChannels[ 0 ].id)
40 41
41 this.serverService.videoPrivaciesLoaded 42 this.serverConfig = this.serverService.getTmpConfig()
43 this.serverService.getConfig()
44 .subscribe(config => this.serverConfig = config)
45
46 this.serverService.getVideoPrivacies()
42 .subscribe( 47 .subscribe(
43 () => { 48 privacies => {
44 this.videoPrivacies = this.serverService.getVideoPrivacies() 49 this.videoPrivacies = privacies
45 50
46 this.firstStepPrivacyId = this.DEFAULT_VIDEO_PRIVACY 51 this.firstStepPrivacyId = this.DEFAULT_VIDEO_PRIVACY
47 }) 52 })
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts
index 23b79edd3..28e10e562 100644
--- a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts
+++ b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts
@@ -14,6 +14,7 @@ import { CanComponentDeactivate } from '@app/shared/guards/can-deactivate-guard.
14import { FormValidatorService, UserService } from '@app/shared' 14import { FormValidatorService, UserService } from '@app/shared'
15import { VideoCaptionService } from '@app/shared/video-caption' 15import { VideoCaptionService } from '@app/shared/video-caption'
16import { scrollToTop } from '@app/shared/misc/utils' 16import { scrollToTop } from '@app/shared/misc/utils'
17import { ServerConfig } from '@shared/models'
17 18
18@Component({ 19@Component({
19 selector: 'my-video-upload', 20 selector: 'my-video-upload',
@@ -70,7 +71,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
70 } 71 }
71 72
72 get videoExtensions () { 73 get videoExtensions () {
73 return this.serverService.getConfig().video.file.extensions.join(',') 74 return this.serverConfig.video.file.extensions.join(',')
74 } 75 }
75 76
76 ngOnInit () { 77 ngOnInit () {
@@ -155,7 +156,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
155 } 156 }
156 157
157 const privacy = this.firstStepPrivacyId.toString() 158 const privacy = this.firstStepPrivacyId.toString()
158 const nsfw = this.serverService.getConfig().instance.isNSFW 159 const nsfw = this.serverConfig.instance.isNSFW
159 const waitTranscoding = true 160 const waitTranscoding = true
160 const commentsEnabled = true 161 const commentsEnabled = true
161 const downloadEnabled = true 162 const downloadEnabled = true