2021-07-07 04:51:09 -05:00
|
|
|
import { merge } from 'lodash'
|
2021-12-17 04:58:15 -06:00
|
|
|
import { About, CustomConfig, HttpStatusCode, ServerConfig } from '@shared/models'
|
2021-12-16 11:04:16 -06:00
|
|
|
import { DeepPartial } from '@shared/typescript-utils'
|
2021-12-17 04:58:15 -06:00
|
|
|
import { AbstractCommand, OverrideCommandOptions } from '../shared/abstract-command'
|
2021-07-07 04:51:09 -05:00
|
|
|
|
|
|
|
export class ConfigCommand extends AbstractCommand {
|
|
|
|
|
2023-04-21 08:00:01 -05:00
|
|
|
static getCustomConfigResolutions (enabled: boolean, with0p = false) {
|
2021-07-07 04:51:09 -05:00
|
|
|
return {
|
2023-04-21 08:00:01 -05:00
|
|
|
'0p': enabled && with0p,
|
2021-11-05 04:23:02 -05:00
|
|
|
'144p': enabled,
|
2021-07-07 04:51:09 -05:00
|
|
|
'240p': enabled,
|
|
|
|
'360p': enabled,
|
|
|
|
'480p': enabled,
|
|
|
|
'720p': enabled,
|
|
|
|
'1080p': enabled,
|
|
|
|
'1440p': enabled,
|
|
|
|
'2160p': enabled
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-19 02:28:29 -06:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
static getEmailOverrideConfig (emailPort: number) {
|
|
|
|
return {
|
|
|
|
smtp: {
|
|
|
|
hostname: '127.0.0.1',
|
|
|
|
port: emailPort
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
2023-01-19 08:27:04 -06:00
|
|
|
enableSignup (requiresApproval: boolean, limit = -1) {
|
2023-01-19 02:28:29 -06:00
|
|
|
return this.updateExistingSubConfig({
|
|
|
|
newConfig: {
|
|
|
|
signup: {
|
|
|
|
enabled: true,
|
|
|
|
requiresApproval,
|
2023-01-19 08:27:04 -06:00
|
|
|
limit
|
2023-01-19 02:28:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
2022-08-10 02:53:39 -05:00
|
|
|
disableImports () {
|
|
|
|
return this.setImportsEnabled(false)
|
|
|
|
}
|
|
|
|
|
2021-08-17 01:26:20 -05:00
|
|
|
enableImports () {
|
2022-08-10 02:53:39 -05:00
|
|
|
return this.setImportsEnabled(true)
|
|
|
|
}
|
|
|
|
|
|
|
|
private setImportsEnabled (enabled: boolean) {
|
2021-08-17 01:26:20 -05:00
|
|
|
return this.updateExistingSubConfig({
|
|
|
|
newConfig: {
|
|
|
|
import: {
|
|
|
|
videos: {
|
|
|
|
http: {
|
2022-08-10 02:53:39 -05:00
|
|
|
enabled
|
2021-08-17 01:26:20 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
torrent: {
|
2022-08-10 02:53:39 -05:00
|
|
|
enabled
|
2021-08-17 01:26:20 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2023-01-19 02:28:29 -06:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
2023-07-19 09:02:49 -05:00
|
|
|
disableFileUpdate () {
|
|
|
|
return this.setFileUpdateEnabled(false)
|
|
|
|
}
|
|
|
|
|
|
|
|
enableFileUpdate () {
|
|
|
|
return this.setFileUpdateEnabled(true)
|
|
|
|
}
|
|
|
|
|
|
|
|
private setFileUpdateEnabled (enabled: boolean) {
|
|
|
|
return this.updateExistingSubConfig({
|
|
|
|
newConfig: {
|
|
|
|
videoFile: {
|
|
|
|
update: {
|
|
|
|
enabled
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
2023-01-19 02:28:29 -06:00
|
|
|
enableChannelSync () {
|
|
|
|
return this.setChannelSyncEnabled(true)
|
|
|
|
}
|
|
|
|
|
|
|
|
disableChannelSync () {
|
|
|
|
return this.setChannelSyncEnabled(false)
|
|
|
|
}
|
|
|
|
|
2022-08-10 02:53:39 -05:00
|
|
|
private setChannelSyncEnabled (enabled: boolean) {
|
|
|
|
return this.updateExistingSubConfig({
|
|
|
|
newConfig: {
|
|
|
|
import: {
|
|
|
|
videoChannelSynchronization: {
|
|
|
|
enabled
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2023-01-19 02:28:29 -06:00
|
|
|
// ---------------------------------------------------------------------------
|
2022-08-10 02:53:39 -05:00
|
|
|
|
2021-08-17 01:26:20 -05:00
|
|
|
enableLive (options: {
|
|
|
|
allowReplay?: boolean
|
|
|
|
transcoding?: boolean
|
2022-06-23 03:29:43 -05:00
|
|
|
resolutions?: 'min' | 'max' // Default max
|
2021-08-17 01:26:20 -05:00
|
|
|
} = {}) {
|
2022-06-23 03:29:43 -05:00
|
|
|
const { allowReplay, transcoding, resolutions = 'max' } = options
|
|
|
|
|
2021-08-17 01:26:20 -05:00
|
|
|
return this.updateExistingSubConfig({
|
|
|
|
newConfig: {
|
|
|
|
live: {
|
|
|
|
enabled: true,
|
2022-06-23 03:29:43 -05:00
|
|
|
allowReplay: allowReplay ?? true,
|
2021-08-17 01:26:20 -05:00
|
|
|
transcoding: {
|
2022-06-23 03:29:43 -05:00
|
|
|
enabled: transcoding ?? true,
|
|
|
|
resolutions: ConfigCommand.getCustomConfigResolutions(resolutions === 'max')
|
2021-08-17 01:26:20 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
disableTranscoding () {
|
|
|
|
return this.updateExistingSubConfig({
|
|
|
|
newConfig: {
|
|
|
|
transcoding: {
|
|
|
|
enabled: false
|
2022-02-11 03:51:33 -06:00
|
|
|
},
|
2022-03-22 10:58:49 -05:00
|
|
|
videoStudio: {
|
2022-02-11 03:51:33 -06:00
|
|
|
enabled: false
|
2021-08-17 01:26:20 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2023-04-21 08:00:01 -05:00
|
|
|
// TODO: convert args to object
|
2023-07-11 02:21:13 -05:00
|
|
|
enableTranscoding (webVideo = true, hls = true, with0p = false) {
|
2021-08-17 01:26:20 -05:00
|
|
|
return this.updateExistingSubConfig({
|
|
|
|
newConfig: {
|
|
|
|
transcoding: {
|
|
|
|
enabled: true,
|
2022-02-11 03:51:33 -06:00
|
|
|
|
|
|
|
allowAudioFiles: true,
|
|
|
|
allowAdditionalExtensions: true,
|
|
|
|
|
2023-04-21 08:00:01 -05:00
|
|
|
resolutions: ConfigCommand.getCustomConfigResolutions(true, with0p),
|
2021-08-17 01:26:20 -05:00
|
|
|
|
2023-07-11 02:52:14 -05:00
|
|
|
webVideos: {
|
2023-07-11 02:21:13 -05:00
|
|
|
enabled: webVideo
|
2021-08-17 01:26:20 -05:00
|
|
|
},
|
|
|
|
hls: {
|
|
|
|
enabled: hls
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2023-04-21 08:00:01 -05:00
|
|
|
// TODO: convert args to object
|
2023-07-11 02:21:13 -05:00
|
|
|
enableMinimumTranscoding (webVideo = true, hls = true) {
|
2022-02-11 03:51:33 -06:00
|
|
|
return this.updateExistingSubConfig({
|
|
|
|
newConfig: {
|
|
|
|
transcoding: {
|
|
|
|
enabled: true,
|
2023-06-01 07:51:16 -05:00
|
|
|
|
|
|
|
allowAudioFiles: true,
|
|
|
|
allowAdditionalExtensions: true,
|
|
|
|
|
2022-02-11 03:51:33 -06:00
|
|
|
resolutions: {
|
|
|
|
...ConfigCommand.getCustomConfigResolutions(false),
|
|
|
|
|
|
|
|
'240p': true
|
|
|
|
},
|
|
|
|
|
2023-07-11 02:52:14 -05:00
|
|
|
webVideos: {
|
2023-07-11 02:21:13 -05:00
|
|
|
enabled: webVideo
|
2022-02-11 03:51:33 -06:00
|
|
|
},
|
|
|
|
hls: {
|
|
|
|
enabled: hls
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2023-04-21 08:00:01 -05:00
|
|
|
enableRemoteTranscoding () {
|
|
|
|
return this.updateExistingSubConfig({
|
|
|
|
newConfig: {
|
|
|
|
transcoding: {
|
|
|
|
remoteRunners: {
|
|
|
|
enabled: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
live: {
|
|
|
|
transcoding: {
|
|
|
|
remoteRunners: {
|
|
|
|
enabled: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2023-05-04 08:29:34 -05:00
|
|
|
enableRemoteStudio () {
|
|
|
|
return this.updateExistingSubConfig({
|
|
|
|
newConfig: {
|
|
|
|
videoStudio: {
|
|
|
|
remoteRunners: {
|
|
|
|
enabled: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2023-01-19 02:28:29 -06:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
2022-03-22 10:58:49 -05:00
|
|
|
enableStudio () {
|
2022-03-22 08:35:04 -05:00
|
|
|
return this.updateExistingSubConfig({
|
|
|
|
newConfig: {
|
2022-03-22 10:58:49 -05:00
|
|
|
videoStudio: {
|
2022-03-22 08:35:04 -05:00
|
|
|
enabled: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2023-01-19 02:28:29 -06:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
2021-07-07 04:51:09 -05:00
|
|
|
getConfig (options: OverrideCommandOptions = {}) {
|
|
|
|
const path = '/api/v1/config'
|
|
|
|
|
|
|
|
return this.getRequestBody<ServerConfig>({
|
|
|
|
...options,
|
|
|
|
|
|
|
|
path,
|
2021-07-08 03:55:16 -05:00
|
|
|
implicitToken: false,
|
2021-07-07 04:51:09 -05:00
|
|
|
defaultExpectedStatus: HttpStatusCode.OK_200
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2022-03-17 03:09:06 -05:00
|
|
|
async getIndexHTMLConfig (options: OverrideCommandOptions = {}) {
|
|
|
|
const text = await this.getRequestText({
|
|
|
|
...options,
|
|
|
|
|
|
|
|
path: '/',
|
|
|
|
implicitToken: false,
|
|
|
|
defaultExpectedStatus: HttpStatusCode.OK_200
|
|
|
|
})
|
|
|
|
|
|
|
|
const match = text.match('<script type="application/javascript">window.PeerTubeServerConfig = (".+?")</script>')
|
|
|
|
|
|
|
|
// We parse the string twice, first to extract the string and then to extract the JSON
|
|
|
|
return JSON.parse(JSON.parse(match[1])) as ServerConfig
|
|
|
|
}
|
|
|
|
|
2021-07-07 04:51:09 -05:00
|
|
|
getAbout (options: OverrideCommandOptions = {}) {
|
|
|
|
const path = '/api/v1/config/about'
|
|
|
|
|
|
|
|
return this.getRequestBody<About>({
|
|
|
|
...options,
|
|
|
|
|
|
|
|
path,
|
2021-07-08 03:55:16 -05:00
|
|
|
implicitToken: false,
|
2021-07-07 04:51:09 -05:00
|
|
|
defaultExpectedStatus: HttpStatusCode.OK_200
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
getCustomConfig (options: OverrideCommandOptions = {}) {
|
|
|
|
const path = '/api/v1/config/custom'
|
|
|
|
|
|
|
|
return this.getRequestBody<CustomConfig>({
|
|
|
|
...options,
|
|
|
|
|
|
|
|
path,
|
2021-07-08 03:55:16 -05:00
|
|
|
implicitToken: true,
|
2021-07-07 04:51:09 -05:00
|
|
|
defaultExpectedStatus: HttpStatusCode.OK_200
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
updateCustomConfig (options: OverrideCommandOptions & {
|
|
|
|
newCustomConfig: CustomConfig
|
|
|
|
}) {
|
|
|
|
const path = '/api/v1/config/custom'
|
|
|
|
|
|
|
|
return this.putBodyRequest({
|
|
|
|
...options,
|
|
|
|
|
|
|
|
path,
|
|
|
|
fields: options.newCustomConfig,
|
2021-07-08 03:55:16 -05:00
|
|
|
implicitToken: true,
|
2021-07-07 04:51:09 -05:00
|
|
|
defaultExpectedStatus: HttpStatusCode.OK_200
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
deleteCustomConfig (options: OverrideCommandOptions = {}) {
|
|
|
|
const path = '/api/v1/config/custom'
|
|
|
|
|
|
|
|
return this.deleteRequest({
|
|
|
|
...options,
|
|
|
|
|
|
|
|
path,
|
2021-07-08 03:55:16 -05:00
|
|
|
implicitToken: true,
|
2021-07-07 04:51:09 -05:00
|
|
|
defaultExpectedStatus: HttpStatusCode.OK_200
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2021-08-17 01:26:20 -05:00
|
|
|
async updateExistingSubConfig (options: OverrideCommandOptions & {
|
|
|
|
newConfig: DeepPartial<CustomConfig>
|
|
|
|
}) {
|
2022-02-11 03:51:33 -06:00
|
|
|
const existing = await this.getCustomConfig({ ...options, expectedStatus: HttpStatusCode.OK_200 })
|
2021-08-17 01:26:20 -05:00
|
|
|
|
|
|
|
return this.updateCustomConfig({ ...options, newCustomConfig: merge({}, existing, options.newConfig) })
|
|
|
|
}
|
|
|
|
|
2021-07-07 04:51:09 -05:00
|
|
|
updateCustomSubConfig (options: OverrideCommandOptions & {
|
|
|
|
newConfig: DeepPartial<CustomConfig>
|
|
|
|
}) {
|
|
|
|
const newCustomConfig: CustomConfig = {
|
|
|
|
instance: {
|
|
|
|
name: 'PeerTube updated',
|
|
|
|
shortDescription: 'my short description',
|
|
|
|
description: 'my super description',
|
|
|
|
terms: 'my super terms',
|
|
|
|
codeOfConduct: 'my super coc',
|
|
|
|
|
|
|
|
creationReason: 'my super creation reason',
|
|
|
|
moderationInformation: 'my super moderation information',
|
|
|
|
administrator: 'Kuja',
|
|
|
|
maintenanceLifetime: 'forever',
|
|
|
|
businessModel: 'my super business model',
|
|
|
|
hardwareInformation: '2vCore 3GB RAM',
|
|
|
|
|
|
|
|
languages: [ 'en', 'es' ],
|
|
|
|
categories: [ 1, 2 ],
|
|
|
|
|
|
|
|
isNSFW: true,
|
|
|
|
defaultNSFWPolicy: 'blur',
|
|
|
|
|
|
|
|
defaultClientRoute: '/videos/recently-added',
|
|
|
|
|
|
|
|
customizations: {
|
|
|
|
javascript: 'alert("coucou")',
|
|
|
|
css: 'body { background-color: red; }'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
theme: {
|
|
|
|
default: 'default'
|
|
|
|
},
|
|
|
|
services: {
|
|
|
|
twitter: {
|
|
|
|
username: '@MySuperUsername',
|
|
|
|
whitelisted: true
|
|
|
|
}
|
|
|
|
},
|
2021-12-03 10:04:47 -06:00
|
|
|
client: {
|
|
|
|
videos: {
|
|
|
|
miniature: {
|
|
|
|
preferAuthorDisplayName: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
menu: {
|
|
|
|
login: {
|
|
|
|
redirectOnSingleExternalAuth: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2021-07-07 04:51:09 -05:00
|
|
|
cache: {
|
|
|
|
previews: {
|
|
|
|
size: 2
|
|
|
|
},
|
|
|
|
captions: {
|
|
|
|
size: 3
|
|
|
|
},
|
|
|
|
torrents: {
|
|
|
|
size: 4
|
2023-06-01 07:51:16 -05:00
|
|
|
},
|
|
|
|
storyboards: {
|
|
|
|
size: 5
|
2021-07-07 04:51:09 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
signup: {
|
|
|
|
enabled: false,
|
|
|
|
limit: 5,
|
2023-01-19 02:28:29 -06:00
|
|
|
requiresApproval: true,
|
2021-07-07 04:51:09 -05:00
|
|
|
requiresEmailVerification: false,
|
|
|
|
minimumAge: 16
|
|
|
|
},
|
|
|
|
admin: {
|
|
|
|
email: 'superadmin1@example.com'
|
|
|
|
},
|
|
|
|
contactForm: {
|
|
|
|
enabled: true
|
|
|
|
},
|
|
|
|
user: {
|
2023-04-07 03:09:54 -05:00
|
|
|
history: {
|
|
|
|
videos: {
|
|
|
|
enabled: true
|
|
|
|
}
|
|
|
|
},
|
2021-07-07 04:51:09 -05:00
|
|
|
videoQuota: 5242881,
|
|
|
|
videoQuotaDaily: 318742
|
|
|
|
},
|
2021-10-26 09:42:10 -05:00
|
|
|
videoChannels: {
|
|
|
|
maxPerUser: 20
|
|
|
|
},
|
2021-07-07 04:51:09 -05:00
|
|
|
transcoding: {
|
|
|
|
enabled: true,
|
2023-04-21 08:00:01 -05:00
|
|
|
remoteRunners: {
|
|
|
|
enabled: false
|
|
|
|
},
|
2021-07-07 04:51:09 -05:00
|
|
|
allowAdditionalExtensions: true,
|
|
|
|
allowAudioFiles: true,
|
|
|
|
threads: 1,
|
|
|
|
concurrency: 3,
|
|
|
|
profile: 'default',
|
|
|
|
resolutions: {
|
|
|
|
'0p': false,
|
2021-11-05 04:23:02 -05:00
|
|
|
'144p': false,
|
2021-07-07 04:51:09 -05:00
|
|
|
'240p': false,
|
|
|
|
'360p': true,
|
|
|
|
'480p': true,
|
|
|
|
'720p': false,
|
|
|
|
'1080p': false,
|
|
|
|
'1440p': false,
|
|
|
|
'2160p': false
|
|
|
|
},
|
2022-08-05 03:36:19 -05:00
|
|
|
alwaysTranscodeOriginalResolution: true,
|
2023-07-11 02:52:14 -05:00
|
|
|
webVideos: {
|
2021-07-07 04:51:09 -05:00
|
|
|
enabled: true
|
|
|
|
},
|
|
|
|
hls: {
|
|
|
|
enabled: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
live: {
|
|
|
|
enabled: true,
|
|
|
|
allowReplay: false,
|
2022-03-04 06:40:02 -06:00
|
|
|
latencySetting: {
|
|
|
|
enabled: false
|
|
|
|
},
|
2021-07-07 04:51:09 -05:00
|
|
|
maxDuration: -1,
|
|
|
|
maxInstanceLives: -1,
|
|
|
|
maxUserLives: 50,
|
|
|
|
transcoding: {
|
|
|
|
enabled: true,
|
2023-04-21 08:00:01 -05:00
|
|
|
remoteRunners: {
|
|
|
|
enabled: false
|
|
|
|
},
|
2021-07-07 04:51:09 -05:00
|
|
|
threads: 4,
|
|
|
|
profile: 'default',
|
|
|
|
resolutions: {
|
2021-11-05 04:23:02 -05:00
|
|
|
'144p': true,
|
2021-07-07 04:51:09 -05:00
|
|
|
'240p': true,
|
|
|
|
'360p': true,
|
|
|
|
'480p': true,
|
|
|
|
'720p': true,
|
|
|
|
'1080p': true,
|
|
|
|
'1440p': true,
|
|
|
|
'2160p': true
|
2022-08-05 03:36:19 -05:00
|
|
|
},
|
|
|
|
alwaysTranscodeOriginalResolution: true
|
2021-07-07 04:51:09 -05:00
|
|
|
}
|
|
|
|
},
|
2022-03-22 10:58:49 -05:00
|
|
|
videoStudio: {
|
2023-05-04 08:29:34 -05:00
|
|
|
enabled: false,
|
|
|
|
remoteRunners: {
|
|
|
|
enabled: false
|
|
|
|
}
|
2022-02-11 03:51:33 -06:00
|
|
|
},
|
2023-07-19 09:02:49 -05:00
|
|
|
videoFile: {
|
|
|
|
update: {
|
|
|
|
enabled: false
|
|
|
|
}
|
|
|
|
},
|
2021-07-07 04:51:09 -05:00
|
|
|
import: {
|
|
|
|
videos: {
|
|
|
|
concurrency: 3,
|
|
|
|
http: {
|
|
|
|
enabled: false
|
|
|
|
},
|
|
|
|
torrent: {
|
|
|
|
enabled: false
|
|
|
|
}
|
2022-08-10 02:53:39 -05:00
|
|
|
},
|
|
|
|
videoChannelSynchronization: {
|
|
|
|
enabled: false,
|
|
|
|
maxPerUser: 10
|
2021-07-07 04:51:09 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
trending: {
|
|
|
|
videos: {
|
|
|
|
algorithms: {
|
2022-06-03 07:04:52 -05:00
|
|
|
enabled: [ 'hot', 'most-viewed', 'most-liked' ],
|
2021-07-07 04:51:09 -05:00
|
|
|
default: 'hot'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
autoBlacklist: {
|
|
|
|
videos: {
|
|
|
|
ofUsers: {
|
|
|
|
enabled: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
followers: {
|
|
|
|
instance: {
|
|
|
|
enabled: true,
|
|
|
|
manualApproval: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
followings: {
|
|
|
|
instance: {
|
|
|
|
autoFollowBack: {
|
|
|
|
enabled: false
|
|
|
|
},
|
|
|
|
autoFollowIndex: {
|
|
|
|
indexUrl: 'https://instances.joinpeertube.org/api/v1/instances/hosts',
|
|
|
|
enabled: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
broadcastMessage: {
|
|
|
|
enabled: true,
|
|
|
|
level: 'warning',
|
|
|
|
message: 'hello',
|
|
|
|
dismissable: true
|
|
|
|
},
|
|
|
|
search: {
|
|
|
|
remoteUri: {
|
|
|
|
users: true,
|
|
|
|
anonymous: true
|
|
|
|
},
|
|
|
|
searchIndex: {
|
|
|
|
enabled: true,
|
|
|
|
url: 'https://search.joinpeertube.org',
|
|
|
|
disableLocalSearch: true,
|
|
|
|
isDefaultSearch: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
merge(newCustomConfig, options.newConfig)
|
|
|
|
|
|
|
|
return this.updateCustomConfig({ ...options, newCustomConfig })
|
|
|
|
}
|
|
|
|
}
|