mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 11:24:35 -05:00
Remove category filter (#551)
This commit is contained in:
@@ -38,7 +38,6 @@ import suwayomi.tachidesk.graphql.server.primitives.lessNotUnique
|
|||||||
import suwayomi.tachidesk.graphql.server.primitives.maybeSwap
|
import suwayomi.tachidesk.graphql.server.primitives.maybeSwap
|
||||||
import suwayomi.tachidesk.graphql.types.MangaNodeList
|
import suwayomi.tachidesk.graphql.types.MangaNodeList
|
||||||
import suwayomi.tachidesk.graphql.types.MangaType
|
import suwayomi.tachidesk.graphql.types.MangaType
|
||||||
import suwayomi.tachidesk.manga.model.table.CategoryMangaTable
|
|
||||||
import suwayomi.tachidesk.manga.model.table.MangaStatus
|
import suwayomi.tachidesk.manga.model.table.MangaStatus
|
||||||
import suwayomi.tachidesk.manga.model.table.MangaTable
|
import suwayomi.tachidesk.manga.model.table.MangaTable
|
||||||
import java.util.concurrent.CompletableFuture
|
import java.util.concurrent.CompletableFuture
|
||||||
@@ -172,7 +171,6 @@ class MangaQuery {
|
|||||||
val realUrl: StringFilter? = null,
|
val realUrl: StringFilter? = null,
|
||||||
val lastFetchedAt: LongFilter? = null,
|
val lastFetchedAt: LongFilter? = null,
|
||||||
val chaptersLastFetchedAt: LongFilter? = null,
|
val chaptersLastFetchedAt: LongFilter? = null,
|
||||||
val category: IntFilter? = null,
|
|
||||||
override val and: List<MangaFilter>? = null,
|
override val and: List<MangaFilter>? = null,
|
||||||
override val or: List<MangaFilter>? = null,
|
override val or: List<MangaFilter>? = null,
|
||||||
override val not: MangaFilter? = null
|
override val not: MangaFilter? = null
|
||||||
@@ -196,8 +194,6 @@ class MangaQuery {
|
|||||||
andFilterWithCompare(MangaTable.inLibraryAt, chaptersLastFetchedAt)
|
andFilterWithCompare(MangaTable.inLibraryAt, chaptersLastFetchedAt)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getCategoryOp() = andFilterWithCompareEntity(CategoryMangaTable.category, category)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun mangas(
|
fun mangas(
|
||||||
@@ -214,14 +210,6 @@ class MangaQuery {
|
|||||||
val queryResults = transaction {
|
val queryResults = transaction {
|
||||||
val res = MangaTable.selectAll()
|
val res = MangaTable.selectAll()
|
||||||
|
|
||||||
val categoryOp = filter?.getCategoryOp()
|
|
||||||
if (categoryOp != null) {
|
|
||||||
res.adjustColumnSet {
|
|
||||||
innerJoin(CategoryMangaTable)
|
|
||||||
}
|
|
||||||
res.andWhere { categoryOp }
|
|
||||||
}
|
|
||||||
|
|
||||||
res.applyOps(condition, filter)
|
res.applyOps(condition, filter)
|
||||||
|
|
||||||
if (orderBy != null || (last != null || before != null)) {
|
if (orderBy != null || (last != null || before != null)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user