Added maxBuffer option to all downloads

This commit is contained in:
Isaac Abadi
2021-02-22 12:55:30 -07:00
parent 9d09eeffe3
commit f32b394715

View File

@@ -1155,7 +1155,7 @@ async function downloadFileByURL_exec(url, type, options, sessionID = null) {
} }
// download file // download file
youtubedl.exec(url, downloadConfig, {}, async function(err, output) { youtubedl.exec(url, downloadConfig, {maxBuffer: Infinity}, async function(err, output) {
if (download_checker) clearInterval(download_checker); // stops the download checker from running as the download finished (or errored) if (download_checker) clearInterval(download_checker); // stops the download checker from running as the download finished (or errored)
download['downloading'] = false; download['downloading'] = false;
@@ -1569,7 +1569,7 @@ async function getUrlInfos(urls) {
let startDate = Date.now(); let startDate = Date.now();
let result = []; let result = [];
return new Promise(resolve => { return new Promise(resolve => {
youtubedl.exec(urls.join(' '), ['--dump-json'], {}, (err, output) => { youtubedl.exec(urls.join(' '), ['--dump-json'], {maxBuffer: Infinity}, (err, output) => {
let new_date = Date.now(); let new_date = Date.now();
let difference = (new_date - startDate)/1000; let difference = (new_date - startDate)/1000;
logger.debug(`URL info retrieval delay: ${difference} seconds.`); logger.debug(`URL info retrieval delay: ${difference} seconds.`);