-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add logic to only update specific categories #520
Add logic to only update specific categories #520
Conversation
server/src/main/kotlin/suwayomi/tachidesk/manga/controller/UpdateController.kt
Outdated
Show resolved
Hide resolved
0594d3d
to
c70c1a9
Compare
server/src/main/kotlin/suwayomi/tachidesk/manga/controller/UpdateController.kt
Outdated
Show resolved
Hide resolved
c70c1a9
to
682975a
Compare
682975a
to
6afa94b
Compare
server/src/main/kotlin/suwayomi/tachidesk/manga/controller/UpdateController.kt
Outdated
Show resolved
Hide resolved
/* | ||
* Copyright (C) Contributors to the Suwayomi project | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* 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(2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is UNSET 2 and not 0? I image 0 as a sane default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no real reason, I just went with boolean (0 = false/exclude, 1 = true/include) which left 2 for UNSET
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well if we are mapping to numbers, -1 would be better for UNSET as it's not a natural number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But all things considered, as this is not c/c++ it doesn't matter which number we are mapping to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also thought about -1, I prefer that over having UNSET as 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to -1
server/src/main/kotlin/suwayomi/tachidesk/manga/impl/CategoryManga.kt
Outdated
Show resolved
Hide resolved
c557c45
to
2b6a751
Compare
Fix merge conflicts |
server/src/main/kotlin/suwayomi/tachidesk/manga/controller/UpdateController.kt
Outdated
Show resolved
Hide resolved
9e146bc
to
120a7f1
Compare
Fix merge conflicts |
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.
120a7f1
to
0b8df4b
Compare
done |
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.