From 24cabc1f02632b40399b3a8e093fbb642431071f Mon Sep 17 00:00:00 2001 From: Tzahi12345 Date: Fri, 21 Apr 2023 16:12:41 -0400 Subject: [PATCH] Fixed issue where videos would be downloaded in the collectInfo stage (#774) --- backend/downloader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/downloader.js b/backend/downloader.js index 11caa36..0f3fb56 100644 --- a/backend/downloader.js +++ b/backend/downloader.js @@ -245,7 +245,6 @@ async function collectInfo(download_uid) { options.customOutput = category['custom_output']; options.noRelativePath = true; args = await exports.generateArgs(url, type, options, download['user_uid']); - args = utils.filterArgs(args, ['--no-simulate']); info = await exports.getVideoInfoByURL(url, args, download_uid); } @@ -552,7 +551,8 @@ exports.generateArgs = async (url, type, options, user_uid = null, simulated = f exports.getVideoInfoByURL = async (url, args = [], download_uid = null) => { return new Promise(resolve => { // remove bad args - const new_args = [...args]; + let new_args = [...args]; + new_args = utils.filterArgs(new_args, ['--no-simulate']); const archiveArgIndex = new_args.indexOf('--download-archive'); if (archiveArgIndex !== -1) {