mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-21 02:33:20 +03:00
Output on global args will now override specific output
This commit is contained in:
@@ -1535,6 +1535,11 @@ async function generateArgs(url, type, options) {
|
|||||||
|
|
||||||
if (globalArgs && globalArgs !== '') {
|
if (globalArgs && globalArgs !== '') {
|
||||||
// adds global args
|
// adds global args
|
||||||
|
if (downloadConfig.indexOf('-o') !== -1 && globalArgs.split(',,').indexOf('-o') !== -1) {
|
||||||
|
// if global args has an output, replce the original output with that of global args
|
||||||
|
const original_output_index = downloadConfig.indexOf('-o');
|
||||||
|
downloadConfig.splice(original_output_index, 2);
|
||||||
|
}
|
||||||
downloadConfig = downloadConfig.concat(globalArgs.split(',,'));
|
downloadConfig = downloadConfig.concat(globalArgs.split(',,'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user