Added stream ignore option.

This commit is contained in:
DebaucheryLibrarian
2023-06-18 02:12:13 +02:00
parent 2f4ac4e427
commit 87a29baf8b
5 changed files with 17 additions and 3 deletions

View File

@@ -645,6 +645,10 @@ async function fetchSource(source, baseMedia) {
logger.silly(`Fetching media from ${source.src}`);
logger.debug(`Memory usage before media fetch: ${process.memoryUsage.rss() / 1000000} MB (${source.src})`);
if (source.stream && !config.media.fetchStreams) {
throw new Error(`Stream fetching disabled, ignoring ${source.stream}`);
}
async function attempt(attempts = 1) {
const hasher = new blake2.Hash('blake2b', { digestLength: 24 });
let hasherReady = true;