From 5e47f6ab984a7d00782e4c7030afffa1ba480add Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 4 May 2023 15:29:34 +0200 Subject: Support studio transcoding in peertube runner --- client/src/app/+admin/admin.component.ts | 4 +++- .../edit-custom-config/edit-configuration.service.ts | 4 ++++ .../edit-custom-config/edit-custom-config.component.ts | 5 ++++- .../edit-custom-config/edit-vod-transcoding.component.html | 14 ++++++++++++++ .../edit-custom-config/edit-vod-transcoding.component.ts | 8 ++++++++ 5 files changed, 33 insertions(+), 2 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/+admin/admin.component.ts b/client/src/app/+admin/admin.component.ts index d4d912c40..49092ea2a 100644 --- a/client/src/app/+admin/admin.component.ts +++ b/client/src/app/+admin/admin.component.ts @@ -272,6 +272,8 @@ export class AdminComponent implements OnInit { private isRemoteRunnersEnabled () { const config = this.server.getHTMLConfig() - return config.transcoding.remoteRunners.enabled || config.live.transcoding.remoteRunners.enabled + return config.transcoding.remoteRunners.enabled || + config.live.transcoding.remoteRunners.enabled || + config.videoStudio.remoteRunners.enabled } } diff --git a/client/src/app/+admin/config/edit-custom-config/edit-configuration.service.ts b/client/src/app/+admin/config/edit-custom-config/edit-configuration.service.ts index 96f5b830e..6c431ce64 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-configuration.service.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-configuration.service.ts @@ -61,6 +61,10 @@ export class EditConfigurationService { return form.value['transcoding']['enabled'] === true } + isStudioEnabled (form: FormGroup) { + return form.value['videoStudio']['enabled'] === true + } + isLiveEnabled (form: FormGroup) { return form.value['live']['enabled'] === true } 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 335aedb67..30e4aa5d5 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 @@ -218,7 +218,10 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { } }, videoStudio: { - enabled: null + enabled: null, + remoteRunners: { + enabled: null + } }, autoBlacklist: { videos: { diff --git a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html index c11f560dd..b17c51532 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html @@ -230,6 +230,20 @@ + +
+ + + + Use remote runners to process studio transcoding tasks. + Remote runners has to register on your instance first. + + + +
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts index 184dfd921..e960533f9 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts @@ -62,10 +62,18 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges { return this.editConfigurationService.isTranscodingEnabled(this.form) } + isStudioEnabled () { + return this.editConfigurationService.isStudioEnabled(this.form) + } + getTranscodingDisabledClass () { return { 'disabled-checkbox-extra': !this.isTranscodingEnabled() } } + getStudioDisabledClass () { + return { 'disabled-checkbox-extra': !this.isStudioEnabled() } + } + getTotalTranscodingThreads () { return this.editConfigurationService.getTotalTranscodingThreads(this.form) } -- cgit v1.2.3