pull/32/head
parent
eb3bfd4db7
commit
f3e1fd0d69
@ -1,17 +1,29 @@ |
|||||||
package io.legado.app.data.entities |
package io.legado.app.data.entities |
||||||
|
|
||||||
|
import io.legado.app.utils.splitNotBlank |
||||||
|
|
||||||
data class SearchShow( |
data class SearchShow( |
||||||
var name: String = "", |
var name: String = "", |
||||||
var author: String = "", |
var author: String = "", |
||||||
override var kind: String? = null, |
var kind: String? = null, |
||||||
var coverUrl: String? = null, |
var coverUrl: String? = null, |
||||||
var intro: String? = null, |
var intro: String? = null, |
||||||
override var wordCount: String? = null, |
var wordCount: String? = null, |
||||||
var latestChapterTitle: String? = null, |
var latestChapterTitle: String? = null, |
||||||
var time: Long = 0L, |
var time: Long = 0L, |
||||||
var originCount: Int = 0 |
var originCount: Int = 0 |
||||||
) : BaseBook { |
) { |
||||||
override var variableMap: HashMap<String, String>? = null |
|
||||||
|
fun getKindList(): List<String> { |
||||||
|
val kindList = arrayListOf<String>() |
||||||
|
wordCount?.let { |
||||||
|
if (it.isNotBlank()) kindList.add(it) |
||||||
|
} |
||||||
|
kind?.let { |
||||||
|
val kinds = it.splitNotBlank(",", "\n") |
||||||
|
kindList.addAll(kinds) |
||||||
|
} |
||||||
|
return kindList |
||||||
|
} |
||||||
|
|
||||||
override fun putVariable(key: String, value: String) = Unit |
|
||||||
} |
} |
Loading…
Reference in new issue