ActivityPub-federated video streaming platform using P2P directly in your web browser
Rename webtorrent config to web_videos
Chocobozzzc57ad141a9ff
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.tsindex 9219d608bf..b381473d64 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@@ -190,7 +190,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {hls: {enabled: null},- webtorrent: {+ webVideos: {enabled: null},remoteRunners: {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.htmlindex 7218511a9c..accf2c28c9 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@@ -67,10 +67,10 @@<div class="callout callout-light pt-2 mt-2 pb-0"><h3 class="callout-title" i18n>Output formats</h3>- <ng-container formGroupName="webtorrent">+ <ng-container formGroupName="webVideos"><div class="form-group" [ngClass]="getTranscodingDisabledClass()"><my-peertube-checkbox- inputName="transcodingWebTorrentEnabled" formControlName="enabled"+ inputName="transcodingWebVideosEnabled" formControlName="enabled"i18n-labelText labelText="Web Videos enabled"><ng-template ptTemplate="help">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.tsindex c5f4ecddb4..6496e8753c 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@@ -90,9 +90,9 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges {const transcodingControl = this.form.get('transcoding.enabled')const videoStudioControl = this.form.get('videoStudio.enabled')const hlsControl = this.form.get('transcoding.hls.enabled')- const webtorrentControl = this.form.get('transcoding.webtorrent.enabled')+ const webVideosControl = this.form.get('transcoding.webVideos.enabled')- webtorrentControl.valueChanges+ webVideosControl.valueChanges.subscribe(newValue => {if (newValue === false && !hlsControl.disabled) {hlsControl.disable()@@ -105,12 +105,12 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges {hlsControl.valueChanges.subscribe(newValue => {- if (newValue === false && !webtorrentControl.disabled) {- webtorrentControl.disable()+ if (newValue === false && !webVideosControl.disabled) {+ webVideosControl.disable()}- if (newValue === true && !webtorrentControl.enabled) {- webtorrentControl.enable()+ if (newValue === true && !webVideosControl.enabled) {+ webVideosControl.enable()}})@@ -122,7 +122,7 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges {})transcodingControl.updateValueAndValidity()- webtorrentControl.updateValueAndValidity()+ webVideosControl.updateValueAndValidity()videoStudioControl.updateValueAndValidity()hlsControl.updateValueAndValidity()}diff --git a/config/default.yaml b/config/default.yamlindex 6f78fb7e92..a9e74095e2 100644--- a/config/default.yaml+++ b/config/default.yaml@@ -483,7 +483,7 @@ transcoding:# Generate videos in a web compatible format# If you also enabled the hls format, it will multiply videos storage by 2# If disabled, breaks federation with PeerTube instances < 2.1- webtorrent:+ web_videos:enabled: false# /!\ Requires ffmpeg >= 4.1diff --git a/config/production.yaml.example b/config/production.yaml.exampleindex 2898a45ac7..8fccaa5177 100644--- a/config/production.yaml.example+++ b/config/production.yaml.example@@ -493,7 +493,7 @@ transcoding:# Generate videos in a web compatible format# If you also enabled the hls format, it will multiply videos storage by 2# If disabled, breaks federation with PeerTube instances < 2.1- webtorrent:+ web_videos:enabled: false# /!\ Requires ffmpeg >= 4.1diff --git a/config/test.yaml b/config/test.yamlindex 41ec0917e6..cc642327cd 100644--- a/config/test.yaml+++ b/config/test.yaml@@ -97,7 +97,7 @@ transcoding:1080p: true1440p: true2160p: true- webtorrent:+ web_videos:enabled: truehls:enabled: truediff --git a/server/controllers/api/config.ts b/server/controllers/api/config.tsindex c1f6756de3..0980ec10a0 100644--- a/server/controllers/api/config.ts+++ b/server/controllers/api/config.ts@@ -242,8 +242,8 @@ function customConfig (): CustomConfig {'2160p': CONFIG.TRANSCODING.RESOLUTIONS['2160p']},alwaysTranscodeOriginalResolution: CONFIG.TRANSCODING.ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION,- webtorrent: {- enabled: CONFIG.TRANSCODING.WEBTORRENT.ENABLED+ webVideos: {+ enabled: CONFIG.TRANSCODING.WEB_VIDEOS.ENABLED},hls: {enabled: CONFIG.TRANSCODING.HLS.ENABLEDdiff --git a/server/controllers/misc.ts b/server/controllers/misc.tsindex 4c8af2adcb..163352ac50 100644--- a/server/controllers/misc.ts+++ b/server/controllers/misc.ts@@ -120,8 +120,8 @@ async function generateNodeinfo (req: express.Request, res: express.Response) {hls: {enabled: CONFIG.TRANSCODING.HLS.ENABLED},- webtorrent: {- enabled: CONFIG.TRANSCODING.WEBTORRENT.ENABLED+ web_videos: {+ enabled: CONFIG.TRANSCODING.WEB_VIDEOS.ENABLED},enabledResolutions: ServerConfigManager.Instance.getEnabledResolutions('vod')},diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.tsindex 21bc5911cd..906a918e34 100644--- a/server/initializers/checker-after-init.ts+++ b/server/initializers/checker-after-init.ts@@ -1,4 +1,5 @@import config from 'config'+import { readFileSync, writeFileSync } from 'fs-extra'import { URL } from 'url'import { uniqify } from '@shared/core-utils'import { getFFmpegVersion } from '@shared/ffmpeg'@@ -10,7 +11,7 @@ import { logger } from '../helpers/logger'import { ApplicationModel, getServerActor } from '../models/application/application'import { OAuthClientModel } from '../models/oauth/oauth-client'import { UserModel } from '../models/user/user'-import { CONFIG, isEmailEnabled } from './config'+import { CONFIG, getLocalConfigFilePath, isEmailEnabled, reloadConfig } from './config'import { WEBSERVER } from './constants'async function checkActivityPubUrls () {@@ -37,10 +38,7 @@ function checkConfig () {const configFiles = config.util.getConfigSources().map(s => s.name).join(' -> ')logger.info('Using following configuration file hierarchy: %s.', configFiles)- // Moved configuration keys- if (config.has('services.csp-logger')) {- logger.warn('services.csp-logger configuration has been renamed to csp.report_uri. Please update your configuration file.')- }+ checkRemovedConfigKeys()checkSecretsConfig()checkEmailConfig()@@ -104,6 +102,34 @@ export {// ---------------------------------------------------------------------------+function checkRemovedConfigKeys () {+ // Moved configuration keys+ if (config.has('services.csp-logger')) {+ logger.warn('services.csp-logger configuration has been renamed to csp.report_uri. Please update your configuration file.')+ }++ if (config.has('transcoding.webtorrent.enabled')) {+ const localConfigPath = getLocalConfigFilePath()++ const content = readFileSync(localConfigPath, { encoding: 'utf-8' })+ if (!content.includes('"webtorrent"')) {+ throw new Error('Please rename transcoding.webtorrent.enabled key to transcoding.web_videos.enabled in your configuration file')+ }++ try {+ logger.info(+ 'Replacing "transcoding.webtorrent.enabled" key to "transcoding.web_videos.enabled" in your local configuration ' + localConfigPath+ )++ writeFileSync(localConfigPath, content.replace('"webtorrent"', '"web_videos"'), { encoding: 'utf-8' })++ reloadConfig()+ } catch (err) {+ logger.error('Cannot write new configuration to file ' + localConfigPath, { err })+ }+ }+}+function checkSecretsConfig () {if (!CONFIG.SECRETS.PEERTUBE) {throw new Error('secrets.peertube is missing in config. Generate one using `openssl rand -hex 32`')@@ -198,7 +224,7 @@ function checkStorageConfig () {function checkTranscodingConfig () {if (CONFIG.TRANSCODING.ENABLED) {- if (CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false && CONFIG.TRANSCODING.HLS.ENABLED === false) {+ if (CONFIG.TRANSCODING.WEB_VIDEOS.ENABLED === false && CONFIG.TRANSCODING.HLS.ENABLED === false) {throw new Error('You need to enable at least Web Video transcoding or HLS transcoding.')}diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.tsindex 939b733444..3d117d1b90 100644--- a/server/initializers/checker-before-init.ts+++ b/server/initializers/checker-before-init.ts@@ -34,8 +34,8 @@ function checkMissedConfig () {'signup.enabled', 'signup.limit', 'signup.requires_approval', 'signup.requires_email_verification', 'signup.minimum_age','signup.filters.cidr.whitelist', 'signup.filters.cidr.blacklist','redundancy.videos.strategies', 'redundancy.videos.check_interval',- 'transcoding.enabled', 'transcoding.threads', 'transcoding.allow_additional_extensions', 'transcoding.hls.enabled',- 'transcoding.profile', 'transcoding.concurrency',+ 'transcoding.enabled', 'transcoding.threads', 'transcoding.allow_additional_extensions', 'transcoding.web_videos.enabled',+ 'transcoding.hls.enabled', 'transcoding.profile', 'transcoding.concurrency','transcoding.resolutions.0p', 'transcoding.resolutions.144p', 'transcoding.resolutions.240p', 'transcoding.resolutions.360p','transcoding.resolutions.480p', 'transcoding.resolutions.720p', 'transcoding.resolutions.1080p', 'transcoding.resolutions.1440p','transcoding.resolutions.2160p', 'transcoding.always_transcode_original_resolution', 'transcoding.remote_runners.enabled',diff --git a/server/initializers/config.ts b/server/initializers/config.tsindex 60ab6e2041..5301a17086 100644--- a/server/initializers/config.ts+++ b/server/initializers/config.ts@@ -371,8 +371,8 @@ const CONFIG = {HLS: {get ENABLED () { return config.get<boolean>('transcoding.hls.enabled') }},- WEBTORRENT: {- get ENABLED () { return config.get<boolean>('transcoding.webtorrent.enabled') }+ WEB_VIDEOS: {+ get ENABLED () { return config.get<boolean>('transcoding.web_videos.enabled') }},REMOTE_RUNNERS: {get ENABLED () { return config.get<boolean>('transcoding.remote_runners.enabled') }@@ -584,16 +584,6 @@ function isEmailEnabled () {return false}-// -----------------------------------------------------------------------------export {- CONFIG,- registerConfigChangedHandler,- isEmailEnabled-}--// ----------------------------------------------------------------------------function getLocalConfigFilePath () {const localConfigDir = getLocalConfigDir()@@ -604,6 +594,17 @@ function getLocalConfigFilePath () {return join(localConfigDir, filename + '.json')}+// ---------------------------------------------------------------------------++export {+ CONFIG,+ getLocalConfigFilePath,+ registerConfigChangedHandler,+ isEmailEnabled+}++// ---------------------------------------------------------------------------+function getLocalConfigDir () {if (process.env.PEERTUBE_LOCAL_CONFIG) return process.env.PEERTUBE_LOCAL_CONFIGdiff --git a/server/lib/server-config-manager.ts b/server/lib/server-config-manager.tsindex 924adb3371..5ce89b16dc 100644--- a/server/lib/server-config-manager.ts+++ b/server/lib/server-config-manager.ts@@ -132,8 +132,8 @@ class ServerConfigManager {hls: {enabled: CONFIG.TRANSCODING.ENABLED && CONFIG.TRANSCODING.HLS.ENABLED},- webtorrent: {- enabled: CONFIG.TRANSCODING.ENABLED && CONFIG.TRANSCODING.WEBTORRENT.ENABLED+ web_videos: {+ enabled: CONFIG.TRANSCODING.ENABLED && CONFIG.TRANSCODING.WEB_VIDEOS.ENABLED},enabledResolutions: this.getEnabledResolutions('vod'),profile: CONFIG.TRANSCODING.PROFILE,diff --git a/server/lib/transcoding/shared/job-builders/transcoding-job-queue-builder.ts b/server/lib/transcoding/shared/job-builders/transcoding-job-queue-builder.tsindex 2ecd57249d..0505c2b2f8 100644--- a/server/lib/transcoding/shared/job-builders/transcoding-job-queue-builder.ts+++ b/server/lib/transcoding/shared/job-builders/transcoding-job-queue-builder.ts@@ -60,7 +60,7 @@ export class TranscodingJobQueueBuilder extends AbstractJobBuilder {if (CONFIG.TRANSCODING.HLS.ENABLED === true) {nextTranscodingSequentialJobPayloads.push([this.buildHLSJobPayload({- deleteWebVideoFiles: CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false,+ deleteWebVideoFiles: CONFIG.TRANSCODING.WEB_VIDEOS.ENABLED === false,// We had some issues with a web video quick transcoded while producing a HLS version of itcopyCodecs: !quickTranscode,@@ -208,7 +208,7 @@ export class TranscodingJobQueueBuilder extends AbstractJobBuilder {for (const resolution of resolutionsEnabled) {const fps = computeOutputFPS({ inputFPS: inputVideoFPS, resolution })- if (CONFIG.TRANSCODING.WEBTORRENT.ENABLED) {+ if (CONFIG.TRANSCODING.WEB_VIDEOS.ENABLED) {const payloads: (NewWebVideoResolutionTranscodingPayload | HLSTranscodingPayload)[] = [this.buildWebVideoJobPayload({videoUUID: video.uuid,diff --git a/server/lib/transcoding/shared/job-builders/transcoding-runner-job-builder.ts b/server/lib/transcoding/shared/job-builders/transcoding-runner-job-builder.tsindex b98172c2df..c0a45f40e6 100644--- a/server/lib/transcoding/shared/job-builders/transcoding-runner-job-builder.ts+++ b/server/lib/transcoding/shared/job-builders/transcoding-runner-job-builder.ts@@ -62,7 +62,7 @@ export class TranscodingRunnerJobBuilder extends AbstractJobBuilder {if (CONFIG.TRANSCODING.HLS.ENABLED === true) {await new VODHLSTranscodingJobHandler().create({video,- deleteWebVideoFiles: CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false,+ deleteWebVideoFiles: CONFIG.TRANSCODING.WEB_VIDEOS.ENABLED === false,resolution: maxResolution,fps,isNewVideo,@@ -169,7 +169,7 @@ export class TranscodingRunnerJobBuilder extends AbstractJobBuilder {for (const resolution of resolutionsEnabled) {const fps = computeOutputFPS({ inputFPS: inputVideoFPS, resolution })- if (CONFIG.TRANSCODING.WEBTORRENT.ENABLED) {+ if (CONFIG.TRANSCODING.WEB_VIDEOS.ENABLED) {await new VODWebVideoTranscodingJobHandler().create({video,resolution,diff --git a/server/middlewares/validators/config.ts b/server/middlewares/validators/config.tsindex 7029a857fc..a6dbba5242 100644--- a/server/middlewares/validators/config.ts+++ b/server/middlewares/validators/config.ts@@ -59,7 +59,7 @@ const customConfigUpdateValidator = [body('transcoding.alwaysTranscodeOriginalResolution').isBoolean(),- body('transcoding.webtorrent.enabled').isBoolean(),+ body('transcoding.webVideos.enabled').isBoolean(),body('transcoding.hls.enabled').isBoolean(),body('videoStudio.enabled').isBoolean(),@@ -153,8 +153,8 @@ function checkInvalidConfigIfEmailDisabled (customConfig: CustomConfig, res: expfunction checkInvalidTranscodingConfig (customConfig: CustomConfig, res: express.Response) {if (customConfig.transcoding.enabled === false) return true- if (customConfig.transcoding.webtorrent.enabled === false && customConfig.transcoding.hls.enabled === false) {- res.fail({ message: 'You need to enable at least webtorrent transcoding or hls transcoding' })+ if (customConfig.transcoding.webVideos.enabled === false && customConfig.transcoding.hls.enabled === false) {+ res.fail({ message: 'You need to enable at least web_videos transcoding or hls transcoding' })return false}diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.tsindex 7f825f79e8..80b616ccff 100644--- a/server/tests/api/check-params/config.ts+++ b/server/tests/api/check-params/config.ts@@ -126,7 +126,7 @@ describe('Test config API validators', function () {'2160p': false},alwaysTranscodeOriginalResolution: false,- webtorrent: {+ webVideos: {enabled: true},hls: {@@ -353,7 +353,7 @@ describe('Test config API validators', function () {hls: {enabled: false},- webtorrent: {+ web_videos: {enabled: false}}diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.tsindex b35059c293..9a8cb4f51e 100644--- a/server/tests/api/redundancy/redundancy.ts+++ b/server/tests/api/redundancy/redundancy.ts@@ -60,7 +60,7 @@ async function createServers (strategy: VideoRedundancyStrategy | null, additionconst config = {transcoding: {- webtorrent: {+ web_videos: {enabled: withWebVideo},hls: {diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.tsindex efa7b50e3f..0e700eddb7 100644--- a/server/tests/api/server/config.ts+++ b/server/tests/api/server/config.ts@@ -79,7 +79,7 @@ function checkInitialConfig (server: PeerTubeServer, data: CustomConfig) {expect(data.transcoding.resolutions['1440p']).to.be.trueexpect(data.transcoding.resolutions['2160p']).to.be.trueexpect(data.transcoding.alwaysTranscodeOriginalResolution).to.be.true- expect(data.transcoding.webtorrent.enabled).to.be.true+ expect(data.transcoding.webVideos.enabled).to.be.trueexpect(data.transcoding.hls.enabled).to.be.trueexpect(data.live.enabled).to.be.false@@ -192,7 +192,7 @@ function checkUpdatedConfig (data: CustomConfig) {expect(data.transcoding.resolutions['2160p']).to.be.falseexpect(data.transcoding.alwaysTranscodeOriginalResolution).to.be.falseexpect(data.transcoding.hls.enabled).to.be.false- expect(data.transcoding.webtorrent.enabled).to.be.true+ expect(data.transcoding.webVideos.enabled).to.be.trueexpect(data.live.enabled).to.be.trueexpect(data.live.allowReplay).to.be.true@@ -344,7 +344,7 @@ const newCustomConfig: CustomConfig = {'2160p': false},alwaysTranscodeOriginalResolution: false,- webtorrent: {+ webVideos: {enabled: true},hls: {diff --git a/server/tests/api/server/stats.ts b/server/tests/api/server/stats.tsindex aad0d231ac..a1bf189fac 100644--- a/server/tests/api/server/stats.ts+++ b/server/tests/api/server/stats.ts@@ -194,7 +194,7 @@ describe('Test stats (excluding redundancy)', function () {newConfig: {transcoding: {enabled: true,- webtorrent: {+ webVideos: {enabled: true},hls: {diff --git a/server/tests/api/transcoding/audio-only.ts b/server/tests/api/transcoding/audio-only.tsindex aa1113fc1f..f4cc012ef4 100644--- a/server/tests/api/transcoding/audio-only.ts+++ b/server/tests/api/transcoding/audio-only.ts@@ -37,7 +37,7 @@ describe('Test audio only video transcoding', function () {hls: {enabled: true},- webtorrent: {+ web_videos: {enabled: true}}diff --git a/server/tests/api/transcoding/create-transcoding.ts b/server/tests/api/transcoding/create-transcoding.tsindex 21a63f5471..9a891043cf 100644--- a/server/tests/api/transcoding/create-transcoding.ts+++ b/server/tests/api/transcoding/create-transcoding.ts@@ -165,7 +165,7 @@ function runTests (enableObjectStorage: boolean) {enabled: true,resolutions: ConfigCommand.getCustomConfigResolutions(false),- webtorrent: {+ webVideos: {enabled: true},hls: {@@ -201,7 +201,7 @@ function runTests (enableObjectStorage: boolean) {enabled: true,resolutions: ConfigCommand.getCustomConfigResolutions(true),- webtorrent: {+ webVideos: {enabled: true},hls: {diff --git a/server/tests/api/transcoding/hls.ts b/server/tests/api/transcoding/hls.tsindex ba889e7187..0d2fc0fba1 100644--- a/server/tests/api/transcoding/hls.ts+++ b/server/tests/api/transcoding/hls.ts@@ -136,7 +136,7 @@ describe('Test HLS videos', function () {hls: {enabled: true},- webtorrent: {+ webVideos: {enabled: false}}diff --git a/server/tests/api/transcoding/transcoder.ts b/server/tests/api/transcoding/transcoder.tsindex 36e1d90f4a..b899b736d9 100644--- a/server/tests/api/transcoding/transcoder.ts+++ b/server/tests/api/transcoding/transcoder.ts@@ -31,7 +31,7 @@ function updateConfigForTranscoding (server: PeerTubeServer) {allowAdditionalExtensions: true,allowAudioFiles: true,hls: { enabled: true },- webtorrent: { enabled: true },+ webVideos: { enabled: true },resolutions: {'0p': false,'144p': true,@@ -333,7 +333,7 @@ describe('Test video transcoding', function () {newConfig: {transcoding: {hls: { enabled: true },- webtorrent: { enabled: true },+ webVideos: { enabled: true },resolutions: {'0p': false,'144p': false,@@ -405,7 +405,7 @@ describe('Test video transcoding', function () {newConfig: {transcoding: {hls: { enabled: true },- webtorrent: { enabled: true },+ webVideos: { enabled: true },resolutions: {'0p': true,'144p': false,@@ -586,7 +586,7 @@ describe('Test video transcoding', function () {'1440p': true,'2160p': true},- webtorrent: { enabled: true },+ web_videos: { enabled: true },hls: { enabled: true }}}@@ -728,7 +728,7 @@ describe('Test video transcoding', function () {transcoding: {enabled: true,hls: { enabled: true },- webtorrent: { enabled: true },+ webVideos: { enabled: true },resolutions: {'0p': false,'144p': false,diff --git a/server/tests/api/transcoding/update-while-transcoding.ts b/server/tests/api/transcoding/update-while-transcoding.tsindex 2e0edc7703..cfb4fa0cca 100644--- a/server/tests/api/transcoding/update-while-transcoding.ts+++ b/server/tests/api/transcoding/update-while-transcoding.ts@@ -121,7 +121,7 @@ describe('Test update video privacy while transcoding', function () {hls: {enabled: true},- webtorrent: {+ webVideos: {enabled: false}}diff --git a/server/tests/api/transcoding/video-studio.ts b/server/tests/api/transcoding/video-studio.tsindex 2595d3cdba..ba68f8e242 100644--- a/server/tests/api/transcoding/video-studio.ts+++ b/server/tests/api/transcoding/video-studio.ts@@ -277,7 +277,7 @@ describe('Test video studio', function () {await servers[0].config.updateExistingSubConfig({newConfig: {transcoding: {- webtorrent: {+ webVideos: {enabled: false}}diff --git a/server/tests/api/users/user-videos.ts b/server/tests/api/users/user-videos.tsindex 70f22e2ebc..77226e48e3 100644--- a/server/tests/api/users/user-videos.ts+++ b/server/tests/api/users/user-videos.ts@@ -189,7 +189,7 @@ describe('Test user videos', function () {{const config = await server.config.getCustomConfig()- config.transcoding.webtorrent.enabled = false+ config.transcoding.webVideos.enabled = falseconfig.transcoding.hls.enabled = trueconfig.transcoding.enabled = trueawait server.config.updateCustomSubConfig({ newConfig: config })diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.tsindex 4f3149d52b..b78b4f3448 100644--- a/server/tests/api/videos/video-imports.ts+++ b/server/tests/api/videos/video-imports.ts@@ -328,7 +328,7 @@ describe('Test video imports', function () {'1440p': false,'2160p': false},- webtorrent: { enabled: true },+ webVideos: { enabled: true },hls: { enabled: false }}}diff --git a/server/tests/feeds/feeds.ts b/server/tests/feeds/feeds.tsindex 83a85be581..1754ac466d 100644--- a/server/tests/feeds/feeds.ts+++ b/server/tests/feeds/feeds.ts@@ -47,7 +47,7 @@ describe('Test syndication feeds', () => {serverHLSOnly = await createSingleServer(3, {transcoding: {enabled: true,- webtorrent: { enabled: false },+ web_videos: { enabled: false },hls: { enabled: true }}})diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.tsindex a02a53c504..a75a8c8fac 100644--- a/server/tests/plugins/filter-hooks.ts+++ b/server/tests/plugins/filter-hooks.ts@@ -493,7 +493,7 @@ describe('Test plugin filter hooks', function () {await servers[0].config.updateCustomSubConfig({newConfig: {transcoding: {- webtorrent: {+ webVideos: {enabled: true},hls: {diff --git a/server/tests/plugins/plugin-transcoding.ts b/server/tests/plugins/plugin-transcoding.tsindex f3d929426c..21f82fbacf 100644--- a/server/tests/plugins/plugin-transcoding.ts+++ b/server/tests/plugins/plugin-transcoding.ts@@ -35,7 +35,7 @@ function updateConf (server: PeerTubeServer, vodProfile: string, liveProfile: sthls: {enabled: true},- webtorrent: {+ webVideos: {enabled: true},resolutions: {diff --git a/server/tests/shared/videos.ts b/server/tests/shared/videos.tsindex 6cba5b14c4..b7f7a16138 100644--- a/server/tests/shared/videos.ts+++ b/server/tests/shared/videos.ts@@ -28,7 +28,7 @@ async function completeWebVideoFilesCheck (options: {const serverConfig = await originServer.config.getConfig()const requiresAuth = video.privacy.id === VideoPrivacy.PRIVATE || video.privacy.id === VideoPrivacy.INTERNAL- const transcodingEnabled = serverConfig.transcoding.webtorrent.enabled+ const transcodingEnabled = serverConfig.transcoding.web_videos.enabledfor (const attributeFile of files) {const file = video.files.find(f => f.resolution.id === attributeFile.resolution)diff --git a/shared/models/server/custom-config.model.ts b/shared/models/server/custom-config.model.tsindex 1012312f37..9aa66f2b8e 100644--- a/shared/models/server/custom-config.model.ts+++ b/shared/models/server/custom-config.model.ts@@ -133,7 +133,7 @@ export interface CustomConfig {alwaysTranscodeOriginalResolution: boolean- webtorrent: {+ webVideos: {enabled: boolean}diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.tsindex 024ed35bff..288cf84cdf 100644--- a/shared/models/server/server-config.model.ts+++ b/shared/models/server/server-config.model.ts@@ -140,7 +140,7 @@ export interface ServerConfig {enabled: boolean}- webtorrent: {+ web_videos: {enabled: boolean}diff --git a/shared/server-commands/server/config-command.ts b/shared/server-commands/server/config-command.tsindex 00dc8e11cd..7f1e9d977d 100644--- a/shared/server-commands/server/config-command.ts+++ b/shared/server-commands/server/config-command.ts@@ -142,7 +142,7 @@ export class ConfigCommand extends AbstractCommand {resolutions: ConfigCommand.getCustomConfigResolutions(true, with0p),- webtorrent: {+ webVideos: {enabled: webVideo},hls: {@@ -169,7 +169,7 @@ export class ConfigCommand extends AbstractCommand {'240p': true},- webtorrent: {+ webVideos: {enabled: webVideo},hls: {@@ -424,7 +424,7 @@ export class ConfigCommand extends AbstractCommand {'2160p': false},alwaysTranscodeOriginalResolution: true,- webtorrent: {+ webVideos: {enabled: true},hls: {diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yamlindex e1a21fb5c8..b2303bdd12 100644--- a/support/doc/api/openapi.yaml+++ b/support/doc/api/openapi.yaml@@ -7768,7 +7768,7 @@ components:properties:enabled:type: boolean- webtorrent:+ web_videos:type: objectproperties:enabled:@@ -8134,7 +8134,7 @@ components:type: boolean2160p:type: boolean- webtorrent:+ web_videos:type: objectdescription: Web Video specific settingsproperties:diff --git a/support/docker/production/config/custom-environment-variables.yaml b/support/docker/production/config/custom-environment-variables.yamlindex 8fff542295..8c1231bfc4 100644--- a/support/docker/production/config/custom-environment-variables.yaml+++ b/support/docker/production/config/custom-environment-variables.yaml@@ -1,7 +1,7 @@-#+## This file will be read by node-config# See https://github.com/node-config/node-config/wiki/Environment-Variables#custom-environment-variables-#+#webserver:hostname: "PEERTUBE_WEBSERVER_HOSTNAME"@@ -177,9 +177,9 @@ transcoding:2160p:__name: "PEERTUBE_TRANSCODING_2160P"__format: "json"- webtorrent:+ web_videos:enabled:- __name: "PEERTUBE_TRANSCODING_WEBTORRENT_ENABLED"+ __name: "PEERTUBE_TRANSCODING_WEB_VIDEOS_ENABLED"__format: "json"hls:enabled: