Adjust update/download warning threshold

This commit is contained in:
arkon
2021-10-11 16:08:32 -04:00
parent f0f3afd5f1
commit b17b882a3b
2 changed files with 7 additions and 4 deletions
@@ -265,7 +265,9 @@ class LibraryUpdateService(
.distinctBy { it.id }
.sortedWith(rankingScheme[selectedScheme])
if (mangaToUpdate.size > QUEUE_SIZE_WARNING_THRESHOLD) {
// Warn when excessively checking a single source
val maxUpdatesFromSource = mangaToUpdate.groupBy { it.source }.maxOf { it.value.size }
if (maxUpdatesFromSource > PER_SOURCE_QUEUE_WARNING_THRESHOLD) {
notifier.showQueueSizeWarningNotification()
}
}
@@ -572,4 +574,4 @@ class LibraryUpdateService(
}
}
const val QUEUE_SIZE_WARNING_THRESHOLD = 100
const val PER_SOURCE_QUEUE_WARNING_THRESHOLD = 50