Replaced queueMethod in media sources for new interval/concurrency options.

This commit is contained in:
DebaucheryLibrarian
2020-11-23 00:38:22 +01:00
parent aa1bba84aa
commit 8688c28d0f
3 changed files with 23 additions and 12 deletions

View File

@@ -105,7 +105,8 @@ function toBaseSource(rawSource) {
if (rawSource.referer) baseSource.referer = rawSource.referer;
if (rawSource.host) baseSource.host = rawSource.host;
if (rawSource.attempts) baseSource.attempts = rawSource.attempts;
if (rawSource.queueMethod) baseSource.queueMethod = rawSource.queueMethod;
if (rawSource.interval) baseSource.interval = rawSource.interval;
if (rawSource.concurrency) baseSource.concurrency = rawSource.concurrency;
if (rawSource.credit !== undefined) baseSource.credit = rawSource.credit;
if (rawSource.comment) baseSource.comment = rawSource.comment;
@@ -435,7 +436,8 @@ async function fetchHttpSource(source, tempFileTarget, hashStream) {
stream: true, // sources are fetched in parallel, don't gobble up memory
transforms: [hashStream],
destination: tempFileTarget,
queueMethod: source.queueMethod || null, // use http module's default
...(source.interval && { interval: source.interval }),
...(source.concurrency && { concurrency: source.concurrency }),
});
if (!res.ok) {