Cleanup library update a bit

This commit is contained in:
Jobobby04 2021-07-08 23:05:08 -04:00
parent a29ddaaf1c
commit 4e8142b5b8

View File

@ -361,11 +361,11 @@ class LibraryUpdateService(
withIOContext { withIOContext {
mangaToUpdate.groupBy { it.source } mangaToUpdate.groupBy { it.source }
.filterNot { it.key in LIBRARY_UPDATE_EXCLUDED_SOURCES } .filterNot { it.key in LIBRARY_UPDATE_EXCLUDED_SOURCES }
.values.map { mangaInSource -> .values
.map { mangaInSource ->
async { async {
semaphore.withPermit { semaphore.withPermit {
mangaInSource mangaInSource.forEach { manga ->
.onEach { manga ->
if (updateJob?.isActive != true) { if (updateJob?.isActive != true) {
return@async return@async
} }