mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-17 01:33:34 -05:00
Change type of Manga.genre to a List<String> (#188)
This commit is contained in:
@@ -7,6 +7,7 @@ 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/. */
|
||||
|
||||
import suwayomi.tachidesk.manga.impl.util.lang.trimAll
|
||||
import suwayomi.tachidesk.manga.model.table.MangaStatus
|
||||
|
||||
data class MangaDataClass(
|
||||
@@ -22,7 +23,7 @@ data class MangaDataClass(
|
||||
val artist: String? = null,
|
||||
val author: String? = null,
|
||||
val description: String? = null,
|
||||
val genre: String? = null,
|
||||
val genre: List<String> = emptyList(),
|
||||
val status: String = MangaStatus.UNKNOWN.name,
|
||||
val inLibrary: Boolean = false,
|
||||
val source: SourceDataClass? = null,
|
||||
@@ -39,3 +40,5 @@ data class PagedMangaListDataClass(
|
||||
val mangaList: List<MangaDataClass>,
|
||||
val hasNextPage: Boolean
|
||||
)
|
||||
|
||||
internal inline fun String?.toGenreList() = this?.split(",")?.trimAll().orEmpty()
|
||||
Reference in New Issue
Block a user