aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/server/config-command.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-07-28 16:06:49 +0200
committerChocobozzz <me@florianbigard.com>2023-07-28 16:06:49 +0200
commit74c8d5bf2d807870ed351fb2a0ee7137987aa995 (patch)
treedc4493ac1afe6b9033753741997318befa828940 /shared/server-commands/server/config-command.ts
parente390107e5acffda6b6fa994be1f2874183bab40c (diff)
downloadPeerTube-74c8d5bf2d807870ed351fb2a0ee7137987aa995.tar.gz
PeerTube-74c8d5bf2d807870ed351fb2a0ee7137987aa995.tar.zst
PeerTube-74c8d5bf2d807870ed351fb2a0ee7137987aa995.zip
Refactor enableTranscoding command helpers
Diffstat (limited to 'shared/server-commands/server/config-command.ts')
-rw-r--r--shared/server-commands/server/config-command.ts17
1 files changed, 13 insertions, 4 deletions
diff --git a/shared/server-commands/server/config-command.ts b/shared/server-commands/server/config-command.ts
index 3521b2d69..5ee2fe021 100644
--- a/shared/server-commands/server/config-command.ts
+++ b/shared/server-commands/server/config-command.ts
@@ -152,8 +152,13 @@ export class ConfigCommand extends AbstractCommand {
152 }) 152 })
153 } 153 }
154 154
155 // TODO: convert args to object 155 enableTranscoding (options: {
156 enableTranscoding (webVideo = true, hls = true, with0p = false) { 156 webVideo?: boolean // default true
157 hls?: boolean // default true
158 with0p?: boolean // default false
159 } = {}) {
160 const { webVideo = true, hls = true, with0p = false } = options
161
157 return this.updateExistingSubConfig({ 162 return this.updateExistingSubConfig({
158 newConfig: { 163 newConfig: {
159 transcoding: { 164 transcoding: {
@@ -175,8 +180,12 @@ export class ConfigCommand extends AbstractCommand {
175 }) 180 })
176 } 181 }
177 182
178 // TODO: convert args to object 183 enableMinimumTranscoding (options: {
179 enableMinimumTranscoding (webVideo = true, hls = true) { 184 webVideo?: boolean // default true
185 hls?: boolean // default true
186 } = {}) {
187 const { webVideo = true, hls = true } = options
188
180 return this.updateExistingSubConfig({ 189 return this.updateExistingSubConfig({
181 newConfig: { 190 newConfig: {
182 transcoding: { 191 transcoding: {