Fix downloader crash related to UnmeteredSource (#7365)
Fix crash when starting a download with chaqpters from a UnmeteredSource (cherry picked from commit 470a5764417ccd63a274ccea0e483a12ec1adbda) (cherry picked from commit 1e53ad97db7ed91d54d872de0330b1cd6cb8bd4c)
This commit is contained in:
parent
1ed182853a
commit
9af0d40479
@ -280,7 +280,8 @@ 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user