diff --git a/backend/app.js b/backend/app.js index 84542fc..8a32dd8 100644 --- a/backend/app.js +++ b/backend/app.js @@ -1479,7 +1479,7 @@ async function generateArgs(url, type, options) { } if (customArgs) { - downloadConfig = customArgs.split(' '); + downloadConfig = customArgs.split(',,'); } else { if (customQualityConfiguration) { qualityPath = `-f ${customQualityConfiguration}`; @@ -1535,7 +1535,7 @@ async function generateArgs(url, type, options) { if (globalArgs && globalArgs !== '') { // adds global args - downloadConfig = downloadConfig.concat(globalArgs.split(' ')); + downloadConfig = downloadConfig.concat(globalArgs.split(',,')); } } diff --git a/src/app/dialogs/arg-modifier-dialog/arg-modifier-dialog.component.ts b/src/app/dialogs/arg-modifier-dialog/arg-modifier-dialog.component.ts index 087a641..a5df6e2 100644 --- a/src/app/dialogs/arg-modifier-dialog/arg-modifier-dialog.component.ts +++ b/src/app/dialogs/arg-modifier-dialog/arg-modifier-dialog.component.ts @@ -72,12 +72,15 @@ export class ArgModifierDialogComponent implements OnInit { } addArg() { + if (!this.modified_args) { + this.modified_args = ''; + } // adds space if (this.modified_args !== '') { - this.modified_args += ' '; + this.modified_args += ',,'; } - this.modified_args += this.stateCtrl.value + ' ' + (this.secondArgEnabled ? this.secondArg : ''); + this.modified_args += this.stateCtrl.value + (this.secondArgEnabled ? ',,' + this.secondArg : ''); } canAddArg() { diff --git a/src/app/main/main.component.ts b/src/app/main/main.component.ts index 1ea5241..147c679 100644 --- a/src/app/main/main.component.ts +++ b/src/app/main/main.component.ts @@ -864,7 +864,7 @@ export class MainComponent implements OnInit { const base_string_array = ['youtube-dl', this.url]; if (customArgsExists) { - this.simulatedOutput = base_string_array.join(' ') + ' ' + this.customArgs; + this.simulatedOutput = base_string_array.join(' ') + ' ' + this.customArgs.split(',,').join(' '); return this.simulatedOutput; } @@ -924,7 +924,7 @@ export class MainComponent implements OnInit { } if (globalArgsExists) { - full_string_array = full_string_array.concat(this.globalCustomArgs.split(' ')); + full_string_array = full_string_array.concat(this.globalCustomArgs.split(',,')); } this.simulatedOutput = full_string_array.join(' ');