mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-08 22:01:28 +03:00
Fixed issue of case where output is empty
This commit is contained in:
@@ -545,7 +545,10 @@ exports.parseOutputJSON = (output, err) => {
|
||||
logger.error(e);
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
} else if (output.length === 0 || (output.length === 1 && output[0].length === 0)) {
|
||||
// output is '' or ['']
|
||||
return [];
|
||||
} else {
|
||||
for (const output_item of output) {
|
||||
// we have to do this because sometimes there will be leading characters before the actual json
|
||||
const start_idx = output_item.indexOf('{"');
|
||||
|
||||
Reference in New Issue
Block a user