BoyLove: fix latest page (#13471)
This commit is contained in:
parent
609af00c7b
commit
fe95bda25e
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'BoyLove'
|
extName = 'BoyLove'
|
||||||
pkgNameSuffix = 'zh.boylove'
|
pkgNameSuffix = 'zh.boylove'
|
||||||
extClass = '.BoyLove'
|
extClass = '.BoyLove'
|
||||||
extVersionCode = 3
|
extVersionCode = 4
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ import java.util.Locale
|
||||||
class MangaDto(
|
class MangaDto(
|
||||||
val id: Int,
|
val id: Int,
|
||||||
private val title: String,
|
private val title: String,
|
||||||
private val update_time: JsonPrimitive,
|
private val update_time: JsonPrimitive? = null,
|
||||||
private val image: String,
|
private val image: String,
|
||||||
private val auther: String,
|
private val auther: String,
|
||||||
private val desc: String,
|
private val desc: String,
|
||||||
|
@ -24,12 +24,6 @@ class MangaDto(
|
||||||
url = id.toString()
|
url = id.toString()
|
||||||
title = this@MangaDto.title
|
title = this@MangaDto.title
|
||||||
author = auther
|
author = auther
|
||||||
val updateTime = if (update_time.isString) {
|
|
||||||
update_time.content
|
|
||||||
} else {
|
|
||||||
dateFormat.format(Date(update_time.long * 1000))
|
|
||||||
}
|
|
||||||
description = "更新时间:$updateTime\n\n$desc"
|
|
||||||
genre = keyword.replace(",", ", ")
|
genre = keyword.replace(",", ", ")
|
||||||
status = when (mhstatus) {
|
status = when (mhstatus) {
|
||||||
0 -> SManga.ONGOING
|
0 -> SManga.ONGOING
|
||||||
|
@ -37,6 +31,16 @@ class MangaDto(
|
||||||
else -> SManga.UNKNOWN
|
else -> SManga.UNKNOWN
|
||||||
}
|
}
|
||||||
thumbnail_url = image.toImageUrl()
|
thumbnail_url = image.toImageUrl()
|
||||||
|
val rawUpdateTime = update_time
|
||||||
|
if (rawUpdateTime == null) {
|
||||||
|
description = desc.trim()
|
||||||
|
return@apply
|
||||||
|
}
|
||||||
|
val updateTime = when {
|
||||||
|
rawUpdateTime.isString -> rawUpdateTime.content
|
||||||
|
else -> dateFormat.format(Date(rawUpdateTime.long * 1000))
|
||||||
|
}
|
||||||
|
description = "更新时间:$updateTime\n\n${desc.trim()}"
|
||||||
initialized = true
|
initialized = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue