mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-22 04:03:32 -05:00
Add logic to only update specific categories (#520)
Makes it possible to only update specific categories. In case a manga is in an excluded category it will be excluded even if it is also in an included category.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package suwayomi.tachidesk.manga.model.dataclass
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
|
||||
/*
|
||||
* Copyright (C) Contributors to the Suwayomi project
|
||||
*
|
||||
@@ -7,11 +9,20 @@ package suwayomi.tachidesk.manga.model.dataclass
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
enum class IncludeInUpdate(@JsonValue val value: Int) {
|
||||
EXCLUDE(0), INCLUDE(1), UNSET(-1);
|
||||
|
||||
companion object {
|
||||
fun fromValue(value: Int) = IncludeInUpdate.values().find { it.value == value } ?: UNSET
|
||||
}
|
||||
}
|
||||
|
||||
data class CategoryDataClass(
|
||||
val id: Int,
|
||||
val order: Int,
|
||||
val name: String,
|
||||
val default: Boolean,
|
||||
val size: Int,
|
||||
val includeInUpdate: IncludeInUpdate,
|
||||
val meta: Map<String, String> = emptyMap()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user