mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 03:14:40 -05:00
Emit update to clients after adding all mangas to the queue (#521)
Emitting updates before all the mangas were added to the queue could lead to e.g. wrong progress calculation.
This commit is contained in:
@@ -93,14 +93,13 @@ object UpdateController {
|
||||
if (clear) {
|
||||
updater.reset()
|
||||
}
|
||||
categories
|
||||
.flatMap { CategoryManga.getCategoryMangaList(it.id) }
|
||||
.distinctBy { it.id }
|
||||
.sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER, MangaDataClass::title))
|
||||
.filter { it.updateStrategy == UpdateStrategy.ALWAYS_UPDATE }
|
||||
.forEach { manga ->
|
||||
updater.addMangaToQueue(manga)
|
||||
}
|
||||
updater.addMangasToQueue(
|
||||
categories
|
||||
.flatMap { CategoryManga.getCategoryMangaList(it.id) }
|
||||
.distinctBy { it.id }
|
||||
.sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER, MangaDataClass::title))
|
||||
.filter { it.updateStrategy == UpdateStrategy.ALWAYS_UPDATE }
|
||||
)
|
||||
}
|
||||
|
||||
fun categoryUpdateWS(ws: WsConfig) {
|
||||
|
||||
Reference in New Issue
Block a user