mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-08 05:14:37 -05:00
Fix unread and download counts casing (#230)
This commit is contained in:
@@ -7,8 +7,16 @@ package suwayomi.tachidesk.manga.impl
|
||||
* 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/. */
|
||||
|
||||
import org.jetbrains.exposed.sql.*
|
||||
import org.jetbrains.exposed.sql.ResultRow
|
||||
import org.jetbrains.exposed.sql.SortOrder
|
||||
import org.jetbrains.exposed.sql.and
|
||||
import org.jetbrains.exposed.sql.count
|
||||
import org.jetbrains.exposed.sql.deleteWhere
|
||||
import org.jetbrains.exposed.sql.insert
|
||||
import org.jetbrains.exposed.sql.select
|
||||
import org.jetbrains.exposed.sql.transactions.transaction
|
||||
import org.jetbrains.exposed.sql.update
|
||||
import org.jetbrains.exposed.sql.wrapAsExpression
|
||||
import suwayomi.tachidesk.manga.impl.Category.DEFAULT_CATEGORY_ID
|
||||
import suwayomi.tachidesk.manga.impl.util.lang.isEmpty
|
||||
import suwayomi.tachidesk.manga.model.dataclass.CategoryDataClass
|
||||
@@ -66,8 +74,8 @@ object CategoryManga {
|
||||
val selectedColumns = MangaTable.columns + unreadExpression + downloadExpression
|
||||
val transform: (ResultRow) -> MangaDataClass = {
|
||||
val dataClass = MangaTable.toDataClass(it)
|
||||
dataClass.unread_count = it[unreadExpression]?.toInt()
|
||||
dataClass.download_count = it[downloadExpression]?.toInt()
|
||||
dataClass.unreadCount = it[unreadExpression]?.toInt()
|
||||
dataClass.downloadCount = it[downloadExpression]?.toInt()
|
||||
dataClass
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user