mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-18 11:21:30 +03:00
Added maxBuffer option to all downloads
This commit is contained in:
@@ -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.`);
|
||||||
|
|||||||
Reference in New Issue
Block a user