Kiryuu: fix manga thumbnail & title (#9223)
This commit is contained in:
parent
5e9b062ce8
commit
018907095a
|
@ -2,7 +2,9 @@ package eu.kanade.tachiyomi.extension.id.kiryuu
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||||
import eu.kanade.tachiyomi.multisrc.wpmangareader.WPMangaReader
|
import eu.kanade.tachiyomi.multisrc.wpmangareader.WPMangaReader
|
||||||
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
|
import org.jsoup.nodes.Document
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
class Kiryuu : WPMangaReader("Kiryuu", "https://kiryuu.id", "id") {
|
class Kiryuu : WPMangaReader("Kiryuu", "https://kiryuu.id", "id") {
|
||||||
|
@ -17,5 +19,41 @@ class Kiryuu : WPMangaReader("Kiryuu", "https://kiryuu.id", "id") {
|
||||||
.addNetworkInterceptor(rateLimitInterceptor)
|
.addNetworkInterceptor(rateLimitInterceptor)
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
|
// manga details
|
||||||
|
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
||||||
|
author = document.select(".listinfo li:contains(Author), .tsinfo .imptdt:nth-child(4) i, .infotable tr:contains(author) td:last-child")
|
||||||
|
.firstOrNull()?.ownText()
|
||||||
|
|
||||||
|
artist = document.select(".infotable tr:contains(artist) td:last-child, .tsinfo .imptdt:contains(artist) i")
|
||||||
|
.firstOrNull()?.ownText()
|
||||||
|
|
||||||
|
genre = document.select("div.gnr a, .mgen a, .seriestugenre a").joinToString { it.text() }
|
||||||
|
status = parseStatus(
|
||||||
|
document.select("div.listinfo li:contains(Status), .tsinfo .imptdt:contains(status), .tsinfo .imptdt:contains(الحالة), .infotable tr:contains(status) td")
|
||||||
|
.text()
|
||||||
|
)
|
||||||
|
|
||||||
|
title = document.selectFirst(".thumb img").attr("title")
|
||||||
|
thumbnail_url = document.select(".thumb img").attr("abs:data-lazy-src")
|
||||||
|
description = document.select(".desc, .entry-content[itemprop=description]").joinToString("\n") { it.text() }
|
||||||
|
|
||||||
|
// add series type(manga/manhwa/manhua/other) thinggy to genre
|
||||||
|
document.select(seriesTypeSelector).firstOrNull()?.ownText()?.let {
|
||||||
|
if (it.isEmpty().not() && genre!!.contains(it, true).not()) {
|
||||||
|
genre += if (genre!!.isEmpty()) it else ", $it"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add alternative name to manga description
|
||||||
|
document.select(altNameSelector).firstOrNull()?.ownText()?.let {
|
||||||
|
if (it.isEmpty().not()) {
|
||||||
|
description += when {
|
||||||
|
description!!.isEmpty() -> altName + it
|
||||||
|
else -> "\n\n$altName" + it
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override val hasProjectPage = true
|
override val hasProjectPage = true
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ class WPMangaReaderGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("AR FlameScans", "https://ar.flamescans.org", "ar"),
|
SingleLang("AR FlameScans", "https://ar.flamescans.org", "ar"),
|
||||||
SingleLang("iiMANGA", "https://iimanga.com", "ar"),
|
SingleLang("iiMANGA", "https://iimanga.com", "ar"),
|
||||||
SingleLang("Magus Manga", "https://magusmanga.com", "ar"),
|
SingleLang("Magus Manga", "https://magusmanga.com", "ar"),
|
||||||
SingleLang("Kiryuu", "https://kiryuu.id", "id", overrideVersionCode = 1),
|
SingleLang("Kiryuu", "https://kiryuu.id", "id", overrideVersionCode = 2),
|
||||||
SingleLang("KomikMama", "https://komikmama.net", "id"),
|
SingleLang("KomikMama", "https://komikmama.net", "id"),
|
||||||
SingleLang("MangaKita", "https://mangakita.net", "id", overrideVersionCode = 1),
|
SingleLang("MangaKita", "https://mangakita.net", "id", overrideVersionCode = 1),
|
||||||
SingleLang("Gabut Scans", "https://gabutscans.com", "id"),
|
SingleLang("Gabut Scans", "https://gabutscans.com", "id"),
|
||||||
|
|
Loading…
Reference in New Issue