Fix selfhosted sources crashing on download start

Fixes #1301
This commit is contained in:
Jays2Kings 2022-06-29 13:11:44 -04:00
parent b62f0694bc
commit 6897d45340

View file

@ -295,7 +295,7 @@ class Downloader(
val maxDownloadsFromSource = queue
.groupBy { it.source }
.filterKeys { it !is UnmeteredSource }
.maxOf { it.value.size }
.maxOfOrNull { it.value.size } ?: 0
if (
queuedDownloads > DOWNLOADS_QUEUED_WARNING_THRESHOLD ||
maxDownloadsFromSource > CHAPTERS_PER_SOURCE_QUEUE_WARNING_THRESHOLD