diff --git a/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/update/Updater.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/update/Updater.kt index 7cd820fd82..370bd22fb2 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/update/Updater.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/update/Updater.kt @@ -21,6 +21,7 @@ import mu.KotlinLogging import suwayomi.tachidesk.manga.impl.Category import suwayomi.tachidesk.manga.impl.CategoryManga import suwayomi.tachidesk.manga.impl.Chapter +import suwayomi.tachidesk.manga.impl.Manga import suwayomi.tachidesk.manga.model.dataclass.CategoryDataClass import suwayomi.tachidesk.manga.model.dataclass.IncludeInUpdate import suwayomi.tachidesk.manga.model.dataclass.MangaDataClass @@ -163,6 +164,9 @@ class Updater : IUpdater { tracker[job.manga.id] = try { logger.info { "Updating \"${job.manga.title}\" (source: ${job.manga.sourceId})" } + if (serverConfig.updateMangas.value) { + Manga.getManga(job.manga.id, true) + } Chapter.getChapterList(job.manga.id, true) job.copy(status = JobStatus.COMPLETE) } catch (e: Exception) { diff --git a/server/src/main/kotlin/suwayomi/tachidesk/server/ServerConfig.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/ServerConfig.kt index 91e41feb29..f1ae3d0acf 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/server/ServerConfig.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/ServerConfig.kt @@ -92,6 +92,7 @@ class ServerConfig(getConfig: () -> Config, val moduleName: String = SERVER_CONF val excludeNotStarted: MutableStateFlow by OverrideConfigValue(BooleanConfigAdapter) val excludeCompleted: MutableStateFlow by OverrideConfigValue(BooleanConfigAdapter) val globalUpdateInterval: MutableStateFlow by OverrideConfigValue(DoubleConfigAdapter) + val updateMangas: MutableStateFlow by OverrideConfigValue(BooleanConfigAdapter) // Authentication val basicAuthEnabled: MutableStateFlow by OverrideConfigValue(BooleanConfigAdapter) diff --git a/server/src/main/resources/server-reference.conf b/server/src/main/resources/server-reference.conf index 46cfb0e9f1..922e82daf1 100644 --- a/server/src/main/resources/server-reference.conf +++ b/server/src/main/resources/server-reference.conf @@ -31,6 +31,7 @@ server.excludeUnreadChapters = true server.excludeNotStarted = true server.excludeCompleted = true server.globalUpdateInterval = 12 # time in hours - 0 to disable it - (doesn't have to be full hours e.g. 12.5) - range: 6 <= n < ∞ - default: 12 hours - interval in which the global update will be automatically triggered +server.updateMangas = false # if the mangas should be updated along the chapter list during a library/category update # Authentication server.basicAuthEnabled = false diff --git a/server/src/test/resources/server-reference.conf b/server/src/test/resources/server-reference.conf index f524e7730e..028cd4d493 100644 --- a/server/src/test/resources/server-reference.conf +++ b/server/src/test/resources/server-reference.conf @@ -21,6 +21,7 @@ server.excludeUnreadChapters = true server.excludeNotStarted = true server.excludeCompleted = true server.globalUpdateInterval = 12 +server.updateMangas = false # misc server.debugLogsEnabled = true