aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/server/config-command.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/server-commands/server/config-command.ts')
-rw-r--r--shared/server-commands/server/config-command.ts34
1 files changed, 33 insertions, 1 deletions
diff --git a/shared/server-commands/server/config-command.ts b/shared/server-commands/server/config-command.ts
index 797231b1d..c0042060b 100644
--- a/shared/server-commands/server/config-command.ts
+++ b/shared/server-commands/server/config-command.ts
@@ -59,6 +59,9 @@ export class ConfigCommand extends AbstractCommand {
59 newConfig: { 59 newConfig: {
60 transcoding: { 60 transcoding: {
61 enabled: false 61 enabled: false
62 },
63 videoEditor: {
64 enabled: false
62 } 65 }
63 } 66 }
64 }) 67 })
@@ -69,6 +72,10 @@ export class ConfigCommand extends AbstractCommand {
69 newConfig: { 72 newConfig: {
70 transcoding: { 73 transcoding: {
71 enabled: true, 74 enabled: true,
75
76 allowAudioFiles: true,
77 allowAdditionalExtensions: true,
78
72 resolutions: ConfigCommand.getCustomConfigResolutions(true), 79 resolutions: ConfigCommand.getCustomConfigResolutions(true),
73 80
74 webtorrent: { 81 webtorrent: {
@@ -82,6 +89,28 @@ export class ConfigCommand extends AbstractCommand {
82 }) 89 })
83 } 90 }
84 91
92 enableMinimumTranscoding (webtorrent = true, hls = true) {
93 return this.updateExistingSubConfig({
94 newConfig: {
95 transcoding: {
96 enabled: true,
97 resolutions: {
98 ...ConfigCommand.getCustomConfigResolutions(false),
99
100 '240p': true
101 },
102
103 webtorrent: {
104 enabled: webtorrent
105 },
106 hls: {
107 enabled: hls
108 }
109 }
110 }
111 })
112 }
113
85 getConfig (options: OverrideCommandOptions = {}) { 114 getConfig (options: OverrideCommandOptions = {}) {
86 const path = '/api/v1/config' 115 const path = '/api/v1/config'
87 116
@@ -148,7 +177,7 @@ export class ConfigCommand extends AbstractCommand {
148 async updateExistingSubConfig (options: OverrideCommandOptions & { 177 async updateExistingSubConfig (options: OverrideCommandOptions & {
149 newConfig: DeepPartial<CustomConfig> 178 newConfig: DeepPartial<CustomConfig>
150 }) { 179 }) {
151 const existing = await this.getCustomConfig(options) 180 const existing = await this.getCustomConfig({ ...options, expectedStatus: HttpStatusCode.OK_200 })
152 181
153 return this.updateCustomConfig({ ...options, newCustomConfig: merge({}, existing, options.newConfig) }) 182 return this.updateCustomConfig({ ...options, newCustomConfig: merge({}, existing, options.newConfig) })
154 } 183 }
@@ -282,6 +311,9 @@ export class ConfigCommand extends AbstractCommand {
282 } 311 }
283 } 312 }
284 }, 313 },
314 videoEditor: {
315 enabled: false
316 },
285 import: { 317 import: {
286 videos: { 318 videos: {
287 concurrency: 3, 319 concurrency: 3,