mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-10 14:52:05 +01:00
Notify clients even if no manga gets updated (#531)
In case no manga gets updated and no update job was running before, the client would never receive an info about its update request
This commit is contained in:
@@ -93,13 +93,20 @@ object UpdateController {
|
||||
if (clear) {
|
||||
updater.reset()
|
||||
}
|
||||
updater.addMangasToQueue(
|
||||
categories
|
||||
|
||||
val mangasToUpdate = categories
|
||||
.flatMap { CategoryManga.getCategoryMangaList(it.id) }
|
||||
.distinctBy { it.id }
|
||||
.sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER, MangaDataClass::title))
|
||||
.filter { it.updateStrategy == UpdateStrategy.ALWAYS_UPDATE }
|
||||
)
|
||||
|
||||
// In case no manga gets updated and no update job was running before, the client would never receive an info about its update request
|
||||
if (mangasToUpdate.isEmpty()) {
|
||||
UpdaterSocket.notifyAllClients(UpdateStatus())
|
||||
return
|
||||
}
|
||||
|
||||
updater.addMangasToQueue(mangasToUpdate)
|
||||
}
|
||||
|
||||
fun categoryUpdateWS(ws: WsConfig) {
|
||||
|
||||
Reference in New Issue
Block a user