Fix wrong type in YM (#17493)

Fix wrong type in YM.
This commit is contained in:
Alessandro Jean 2023-08-11 21:46:57 -03:00 committed by GitHub
parent 7cebc9ac8b
commit e66a5651bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Yomu Mangás'
pkgNameSuffix = 'pt.yomumangas'
extClass = '.YomuMangas'
extVersionCode = 1
extVersionCode = 2
isNsfw = true
}

View File

@ -70,13 +70,13 @@ data class YomuMangasChaptersDto(val chapters: List<YomuMangasChapterDto> = empt
@Serializable
data class YomuMangasChapterDto(
val id: Int,
val chapter: Int,
val chapter: Float,
@SerialName("uploaded_at") val uploadedAt: String,
val images: List<YomuMangasImageDto>? = emptyList(),
) {
fun toSChapter(series: YomuMangasSeriesDto): SChapter = SChapter.create().apply {
name = "Capítulo $chapter"
name = "Capítulo ${chapter.toString().removeSuffix(".0")}"
date_upload = runCatching { DATE_FORMATTER.parse(uploadedAt)?.time }
.getOrNull() ?: 0L
url = "/manga/${series.id}/${series.slug}/chapter/$id#$chapter"