From a84b8fa5cf6e4cafb841af3db9bdfcc9531c09a4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 7 Aug 2018 10:07:53 +0200 Subject: Add import.video.torrent configuration --- .../config/edit-custom-config/edit-custom-config.component.html | 5 +++++ .../config/edit-custom-config/edit-custom-config.component.ts | 7 ++++++- client/src/app/core/server/server.service.ts | 3 +++ client/src/app/videos/+video-edit/video-add.component.scss | 1 + client/src/app/videos/+video-edit/video-add.component.ts | 2 +- 5 files changed, 16 insertions(+), 2 deletions(-) (limited to 'client/src') diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html index 13b43306b..0a032df12 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html @@ -108,6 +108,11 @@ i18n-labelText labelText="Video import with HTTP enabled" > + +
Administrator
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index bc5ce6e5d..fd6784415 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts @@ -72,6 +72,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { signupEnabled: null, signupLimit: this.customConfigValidatorsService.SIGNUP_LIMIT, importVideosHttpEnabled: null, + importVideosTorrentEnabled: null, adminEmail: this.customConfigValidatorsService.ADMIN_EMAIL, userVideoQuota: this.userValidatorsService.USER_VIDEO_QUOTA, transcodingThreads: this.customConfigValidatorsService.TRANSCODING_THREADS, @@ -189,6 +190,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { videos: { http: { enabled: this.form.value['importVideosHttpEnabled'] + }, + torrent: { + enabled: this.form.value['importVideosTorrentEnabled'] } } } @@ -231,7 +235,8 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { transcodingEnabled: this.customConfig.transcoding.enabled, customizationJavascript: this.customConfig.instance.customizations.javascript, customizationCSS: this.customConfig.instance.customizations.css, - importVideosHttpEnabled: this.customConfig.import.videos.http.enabled + importVideosHttpEnabled: this.customConfig.import.videos.http.enabled, + importVideosTorrentEnabled: this.customConfig.import.videos.torrent.enabled } for (const resolution of this.resolutions) { diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index ab317f0aa..52b50cbe8 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts @@ -73,6 +73,9 @@ export class ServerService { videos: { http: { enabled: false + }, + torrent: { + enabled: false } } } diff --git a/client/src/app/videos/+video-edit/video-add.component.scss b/client/src/app/videos/+video-edit/video-add.component.scss index 443361f50..c1f96cc37 100644 --- a/client/src/app/videos/+video-edit/video-add.component.scss +++ b/client/src/app/videos/+video-edit/video-add.component.scss @@ -50,6 +50,7 @@ $background-color: #F7F7F7; border-radius: 3px; width: 100%; min-height: 440px; + padding-bottom: 20px; display: flex; justify-content: center; align-items: center; diff --git a/client/src/app/videos/+video-edit/video-add.component.ts b/client/src/app/videos/+video-edit/video-add.component.ts index 7d360598d..1a9247dbe 100644 --- a/client/src/app/videos/+video-edit/video-add.component.ts +++ b/client/src/app/videos/+video-edit/video-add.component.ts @@ -40,6 +40,6 @@ export class VideoAddComponent implements CanComponentDeactivate { } isVideoImportTorrentEnabled () { - return this.serverService.getConfig().import.videos.http.enabled + return this.serverService.getConfig().import.videos.torrent.enabled } } -- cgit v1.2.3