diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/kemono/KemonoDto.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/kemono/KemonoDto.kt index 9f50f81c7..15fd92074 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/kemono/KemonoDto.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/kemono/KemonoDto.kt @@ -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 diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/kemono/KemonoGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/kemono/KemonoGenerator.kt index 977e44944..9d9fc7d35 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/kemono/KemonoGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/kemono/KemonoGenerator.kt @@ -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) )