mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-27 23:20:56 +03:00
implemented global custom args functionality
fixed bad logic in settings
This commit is contained in:
@@ -801,8 +801,9 @@ export class MainComponent implements OnInit {
|
||||
|
||||
getSimulatedOutput() {
|
||||
const customArgsExists = this.customArgsEnabled && this.customArgs;
|
||||
const globalArgsExists = this.globalCustomArgs && this.globalCustomArgs !== '';
|
||||
|
||||
const full_string_array: string[] = [];
|
||||
let full_string_array: string[] = [];
|
||||
const base_string_array = ['youtube-dl', this.url];
|
||||
|
||||
if (customArgsExists) {
|
||||
@@ -861,6 +862,10 @@ export class MainComponent implements OnInit {
|
||||
full_string_array.push(...additional_params);
|
||||
}
|
||||
|
||||
if (globalArgsExists) {
|
||||
full_string_array = full_string_array.concat(this.globalCustomArgs.split(' '));
|
||||
}
|
||||
|
||||
this.simulatedOutput = full_string_array.join(' ');
|
||||
return this.simulatedOutput;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user