ManhwaWeb: Fix incorrect slug (#11102)

fix slug
This commit is contained in:
bapeey 2025-10-17 12:36:12 -05:00 committed by Draff
parent 16073b38cb
commit d7241034bc
Signed by: Draff
GPG Key ID: E8A89F3211677653
2 changed files with 6 additions and 10 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'ManhwaWeb'
extClass = '.ManhwaWeb'
extVersionCode = 8
extVersionCode = 9
isNsfw = true
}

View File

@ -25,7 +25,7 @@ class PopularComicDto(
fun toSManga() = SManga.create().apply {
title = name
thumbnail_url = thumbnail
url = slug.removePrefix("/")
url = slug.removePrefix("/").replace("manga/", "manhwa/")
}
}
@ -44,16 +44,14 @@ class LatestDto(
@Serializable
class LatestComicDto(
@SerialName("create") val latestChapterDate: Long,
@SerialName("id_manhwa") val slug: String,
@SerialName("_plataforma") val platform: String,
@SerialName("id_rel") val slug: String,
@SerialName("name_manhwa") private val name: String,
@SerialName("img") private val thumbnail: String,
) {
fun toSManga() = SManga.create().apply {
title = name
thumbnail_url = thumbnail
val type = if (platform == "toptoon" || platform == "lezhin") "manhwa" else "manga"
url = "$type/$slug"
url = "manhwa/$slug"
}
}
@ -65,16 +63,14 @@ class PayloadSearchDto(
@Serializable
class SearchComicDto(
@SerialName("_id") val slug: String,
@SerialName("_plataforma") val platform: String,
@SerialName("real_id") val slug: String,
@SerialName("the_real_name") private val name: String,
@SerialName("_imagen") private val thumbnail: String,
) {
fun toSManga() = SManga.create().apply {
title = name
thumbnail_url = thumbnail
val type = if (platform == "toptoon" || platform == "lezhin") "manhwa" else "manga"
url = "$type/$slug"
url = "manhwa/$slug"
}
}