Subscription videos now skip the collect info step during download process, reducing calls to video host

This commit is contained in:
Isaac Abadi
2022-06-23 18:37:54 -04:00
parent 64b4b5a2b4
commit a0c36bf1a1
6 changed files with 43 additions and 6 deletions

View File

@@ -296,7 +296,8 @@ async function getVideosForSub(sub, user_uid = null) {
for (let j = 0; j < files_to_download.length; j++) {
const file_to_download = files_to_download[j];
await downloader_api.createDownload(file_to_download['webpage_url'], sub.type || 'video', base_download_options, user_uid, sub.id, sub.name);
file_to_download['formats'] = utils.stripPropertiesFromObject(file_to_download['formats'], ['format_id', 'filesize', 'filesize_approx']); // prevent download object from blowing up in size
await downloader_api.createDownload(file_to_download['webpage_url'], sub.type || 'video', base_download_options, user_uid, sub.id, sub.name, file_to_download);
}
resolve(files_to_download);
@@ -420,6 +421,8 @@ async function generateArgsForSubscription(sub, user_uid, redownload = false, de
downloadConfig.push('--no-clean-infojson');
}
downloadConfig = utils.filterArgs(downloadConfig, ['--write-comments']);
return downloadConfig;
}