mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-10 06:42:07 +01: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
|
||||
}
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ data class MangaDataClass(
|
||||
val realUrl: String? = null,
|
||||
|
||||
val freshData: Boolean = false,
|
||||
var unread_count: Int? = null,
|
||||
var download_count: Int? = null
|
||||
var unreadCount: Int? = null,
|
||||
var downloadCount: Int? = null
|
||||
)
|
||||
|
||||
data class PagedMangaListDataClass(
|
||||
|
||||
Reference in New Issue
Block a user