Added option to rate limit downloads

Added option to force delay between videos in a subscription

Fixed issue where file handle was maintained on files deleted through unsubscribing
This commit is contained in:
Isaac Abadi
2021-08-01 22:19:15 -06:00
parent f40ac49082
commit b1385f451b
6 changed files with 80 additions and 13 deletions

View File

@@ -1114,6 +1114,11 @@ async function generateArgs(url, type, options) {
}
downloadConfig = downloadConfig.concat(globalArgs.split(',,'));
}
const rate_limit = config_api.getConfigItem('ytdl_download_rate_limit');
if (rate_limit && downloadConfig.indexOf('-r') === -1 && downloadConfig.indexOf('--limit-rate') === -1) {
downloadConfig.push('-r', rate_limit);
}
const default_downloader = utils.getCurrentDownloader() || config_api.getConfigItem('ytdl_default_downloader');
if (default_downloader === 'yt-dlp') {