Kemono: fix search (#13522)
This commit is contained in:
parent
ad7c766be2
commit
96cfadbf46
|
@ -3,6 +3,8 @@ package eu.kanade.tachiyomi.multisrc.kemono
|
|||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.json.JsonPrimitive
|
||||
import kotlinx.serialization.json.double
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
|
@ -11,9 +13,12 @@ class KemonoCreatorDto(
|
|||
private val id: String,
|
||||
val name: String,
|
||||
private val service: String,
|
||||
private val updated: String,
|
||||
private val updated: JsonPrimitive,
|
||||
) {
|
||||
val updatedDate get() = dateFormat.parse(updated)?.time ?: 0
|
||||
val updatedDate get() = when {
|
||||
updated.isString -> dateFormat.parse(updated.content)?.time ?: 0
|
||||
else -> (updated.double * 1000).toLong()
|
||||
}
|
||||
|
||||
fun toSManga(baseUrl: String) = SManga.create().apply {
|
||||
url = "/$service/user/$id" // should be /server/ for Discord but will be filtered anyway
|
||||
|
|
|
@ -6,9 +6,9 @@ import generator.ThemeSourceGenerator
|
|||
class KemonoGenerator : ThemeSourceGenerator {
|
||||
override val themeClass = "Kemono"
|
||||
override val themePkg = "kemono"
|
||||
override val baseVersionCode = 1
|
||||
override val baseVersionCode = 2
|
||||
override val sources = listOf(
|
||||
SingleLang("Kemono", "https://kemono.party", "all", isNsfw = true, className = "KemonoParty", pkgName = "kemono"),
|
||||
SingleLang("Kemono", "https://kemono.party", "all", isNsfw = true),
|
||||
SingleLang("Coomer", "https://coomer.party", "all", isNsfw = true)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue