}
}
+ // ---------------------------------------------------------------------------
+
+ static getEmailOverrideConfig (emailPort: number) {
+ return {
+ smtp: {
+ hostname: '127.0.0.1',
+ port: emailPort
+ }
+ }
+ }
+
+ // ---------------------------------------------------------------------------
+
+ enableSignup (requiresApproval: boolean, limit = -1) {
+ return this.updateExistingSubConfig({
+ newConfig: {
+ signup: {
+ enabled: true,
+ requiresApproval,
+ limit
+ }
+ }
+ })
+ }
+
+ // ---------------------------------------------------------------------------
+
+ disableImports () {
+ return this.setImportsEnabled(false)
+ }
+
enableImports () {
+ return this.setImportsEnabled(true)
+ }
+
+ private setImportsEnabled (enabled: boolean) {
return this.updateExistingSubConfig({
newConfig: {
import: {
videos: {
http: {
- enabled: true
+ enabled
},
torrent: {
- enabled: true
+ enabled
}
}
}
})
}
+ // ---------------------------------------------------------------------------
+
+ enableChannelSync () {
+ return this.setChannelSyncEnabled(true)
+ }
+
+ disableChannelSync () {
+ return this.setChannelSyncEnabled(false)
+ }
+
+ private setChannelSyncEnabled (enabled: boolean) {
+ return this.updateExistingSubConfig({
+ newConfig: {
+ import: {
+ videoChannelSynchronization: {
+ enabled
+ }
+ }
+ }
+ })
+ }
+
+ // ---------------------------------------------------------------------------
+
enableLive (options: {
allowReplay?: boolean
transcoding?: boolean
})
}
+ // ---------------------------------------------------------------------------
+
enableStudio () {
return this.updateExistingSubConfig({
newConfig: {
})
}
+ // ---------------------------------------------------------------------------
+
getConfig (options: OverrideCommandOptions = {}) {
const path = '/api/v1/config'
signup: {
enabled: false,
limit: 5,
+ requiresApproval: true,
requiresEmailVerification: false,
minimumAge: 16
},
torrent: {
enabled: false
}
+ },
+ videoChannelSynchronization: {
+ enabled: false,
+ maxPerUser: 10
}
},
trending: {