diff --git a/multisrc/overrides/wpmangareader/kiryuu/src/Kiryuu.kt b/multisrc/overrides/wpmangareader/kiryuu/src/Kiryuu.kt index 40d13d8fa..07a6b6cdd 100644 --- a/multisrc/overrides/wpmangareader/kiryuu/src/Kiryuu.kt +++ b/multisrc/overrides/wpmangareader/kiryuu/src/Kiryuu.kt @@ -2,7 +2,9 @@ package eu.kanade.tachiyomi.extension.id.kiryuu import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor import eu.kanade.tachiyomi.multisrc.wpmangareader.WPMangaReader +import eu.kanade.tachiyomi.source.model.SManga import okhttp3.OkHttpClient +import org.jsoup.nodes.Document import java.util.concurrent.TimeUnit class Kiryuu : WPMangaReader("Kiryuu", "https://kiryuu.id", "id") { @@ -17,5 +19,41 @@ class Kiryuu : WPMangaReader("Kiryuu", "https://kiryuu.id", "id") { .addNetworkInterceptor(rateLimitInterceptor) .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 } diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangareader/WPMangaReaderGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangareader/WPMangaReaderGenerator.kt index 523d6530b..059e9cc35 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangareader/WPMangaReaderGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangareader/WPMangaReaderGenerator.kt @@ -17,7 +17,7 @@ class WPMangaReaderGenerator : ThemeSourceGenerator { SingleLang("AR FlameScans", "https://ar.flamescans.org", "ar"), SingleLang("iiMANGA", "https://iimanga.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("MangaKita", "https://mangakita.net", "id", overrideVersionCode = 1), SingleLang("Gabut Scans", "https://gabutscans.com", "id"),