mirror of
https://github.com/snobu/destreamer.git
synced 2026-01-17 05:22:18 +00:00
committed by
GitHub
parent
a129ac0240
commit
55234af08f
@@ -174,9 +174,8 @@ function checkInputConflicts(videoUrls: Array<string | number> | undefined,
|
|||||||
|
|
||||||
|
|
||||||
function isOutputTemplateValid(argv: any): boolean {
|
function isOutputTemplateValid(argv: any): boolean {
|
||||||
let finalTemplate: string = argv.outputTemplate;
|
|
||||||
const elementRegEx = RegExp(/{(.*?)}/g);
|
const elementRegEx = RegExp(/{(.*?)}/g);
|
||||||
let match = elementRegEx.exec(finalTemplate);
|
let match = elementRegEx.exec(argv.outputTemplate);
|
||||||
|
|
||||||
// if no template elements this fails
|
// if no template elements this fails
|
||||||
if (match) {
|
if (match) {
|
||||||
@@ -191,11 +190,11 @@ function isOutputTemplateValid(argv: any): boolean {
|
|||||||
|
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
match = elementRegEx.exec(finalTemplate);
|
match = elementRegEx.exec(argv.outputTemplate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
argv.outputTemplate = sanitize(finalTemplate.trim());
|
argv.outputTemplate = sanitize(argv.outputTemplate.trim());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user