fix(id/mikoroku): Fix page list + Enable ZeistManga's search filters (#19421)
* fix: Fix page list on new entries * feat: Set artist & author in mangaDetails page * feat: Enable Genres & Status filter * chore: Bump version * fix: Add missing genres to filter * fix: Merge suggestion - Add historical genre Thanks TheKingTermux! Co-authored-by: TheKingTermux <50316075+TheKingTermux@users.noreply.github.com> --------- Co-authored-by: TheKingTermux <50316075+TheKingTermux@users.noreply.github.com>
This commit is contained in:
parent
db07d894e9
commit
e89862aa1f
|
@ -1,26 +1,86 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.mikoroku
|
package eu.kanade.tachiyomi.extension.id.mikoroku
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.multisrc.zeistmanga.Genre
|
||||||
|
import eu.kanade.tachiyomi.multisrc.zeistmanga.Status
|
||||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
|
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
|
import org.jsoup.nodes.Element
|
||||||
|
|
||||||
class MikoRoku : ZeistManga("MikoRoku", "https://www.mikoroku.web.id", "id") {
|
class MikoRoku : ZeistManga("MikoRoku", "https://www.mikoroku.web.id", "id") {
|
||||||
|
|
||||||
|
// ============================== Popular ===============================
|
||||||
override val popularMangaSelector = "div.PopularPosts article"
|
override val popularMangaSelector = "div.PopularPosts article"
|
||||||
override val popularMangaSelectorTitle = ".post-title a"
|
override val popularMangaSelectorTitle = ".post-title a"
|
||||||
override val popularMangaSelectorUrl = ".post-title a"
|
override val popularMangaSelectorUrl = ".post-title a"
|
||||||
|
|
||||||
override val pageListSelector = "article#reader div.separator a"
|
// ============================== Filters ===============================
|
||||||
|
override val hasFilters = true
|
||||||
|
|
||||||
override fun mangaDetailsParse(response: Response): SManga = SManga.create().apply {
|
// The source actually has both, but they return no result, so its useless.
|
||||||
val document = response.asJsoup()
|
override val hasLanguageFilter = false
|
||||||
with(document.selectFirst("div.section#main div.widget header")!!) {
|
override val hasTypeFilter = false
|
||||||
thumbnail_url = selectFirst("img")!!.attr("abs:src")
|
|
||||||
genre = select("aside dl:has(dt:contains(Genre)) dd a")
|
override fun getStatusList() = listOf(
|
||||||
.joinToString { it.text() }
|
Status("Semua", ""),
|
||||||
status = parseStatus(selectFirst("span[data-status]")!!.text())
|
Status("Ongoing", "Ongoing"),
|
||||||
}
|
Status("Completed", "Completed"),
|
||||||
description = document.select("div.section#main div.widget div.grid #synopsis").text()
|
)
|
||||||
|
|
||||||
|
override fun getGenreList() = listOf(
|
||||||
|
Genre("Action", "Action"),
|
||||||
|
Genre("Adventure", "Adventure"),
|
||||||
|
Genre("Comedy", "Comedy"),
|
||||||
|
Genre("Dark Fantasy", "Dark Fantasy"),
|
||||||
|
Genre("Drama", "Drama"),
|
||||||
|
Genre("Fantasy", "Fantasy"),
|
||||||
|
Genre("Harem", "H4rem"),
|
||||||
|
Genre("Historical", "Historical"),
|
||||||
|
Genre("Horror", "Horror"),
|
||||||
|
Genre("Isekai", "Isekai"),
|
||||||
|
Genre("Magic", "Magic"),
|
||||||
|
Genre("Mecha", "Mecha"),
|
||||||
|
Genre("Military", "Military"),
|
||||||
|
Genre("Monsters", "Monsters"),
|
||||||
|
Genre("Mystery", "Mystery"),
|
||||||
|
Genre("Psychological", "Psychological"),
|
||||||
|
Genre("Romance", "Romance"),
|
||||||
|
Genre("School Life", "School Life"),
|
||||||
|
Genre("Sci-Fi", "Sci-Fi"),
|
||||||
|
Genre("Seinen", "Seinen"),
|
||||||
|
Genre("Shounen", "Shounen"),
|
||||||
|
Genre("Slice of Life", "Slice of Life"),
|
||||||
|
Genre("Supernatural", "Supernatural"),
|
||||||
|
Genre("Survival", "Survival"),
|
||||||
|
Genre("Tragedy", "Tragedy"),
|
||||||
|
)
|
||||||
|
|
||||||
|
// =========================== Manga Details ============================
|
||||||
|
override val mangaDetailsSelector = "div.section#main div.widget:has(main)"
|
||||||
|
override val mangaDetailsSelectorGenres = "dl > dd > a[rel=tag]"
|
||||||
|
|
||||||
|
override fun mangaDetailsParse(response: Response): SManga {
|
||||||
|
val document = response.use { it.asJsoup() }
|
||||||
|
val profileManga = document.selectFirst(mangaDetailsSelector)!!
|
||||||
|
return SManga.create().apply {
|
||||||
|
with(profileManga) {
|
||||||
|
thumbnail_url = selectFirst("img")?.absUrl("src")
|
||||||
|
description = document.select(mangaDetailsSelectorDescription).text()
|
||||||
|
genre = select(mangaDetailsSelectorGenres).eachText().joinToString()
|
||||||
|
status = parseStatus(selectFirst("span[data-status]")?.text().orEmpty())
|
||||||
|
author = getInfo("Author")
|
||||||
|
artist = getInfo("Artist")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun Element.getInfo(text: String): String? =
|
||||||
|
selectFirst("$mangaDetailsSelectorInfo:containsOwn($text) > $mangaDetailsSelectorInfoDescription")
|
||||||
|
?.text()
|
||||||
|
?.trim()
|
||||||
|
|
||||||
|
// =============================== Pages ================================
|
||||||
|
// Specific/faster selection first, generic/slower last
|
||||||
|
override val pageListSelector = "article#reader div.separator a, article#reader"
|
||||||
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class ZeistMangaGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("Loner Translations", "https://loner-tl.blogspot.com", "ar"),
|
SingleLang("Loner Translations", "https://loner-tl.blogspot.com", "ar"),
|
||||||
SingleLang("Manga Ai Land", "https://manga-ai-land.blogspot.com", "ar"),
|
SingleLang("Manga Ai Land", "https://manga-ai-land.blogspot.com", "ar"),
|
||||||
SingleLang("Manga Soul", "https://www.manga-soul.com", "ar", isNsfw = true),
|
SingleLang("Manga Soul", "https://www.manga-soul.com", "ar", isNsfw = true),
|
||||||
SingleLang("MikoRoku", "https://www.mikoroku.web.id", "id", isNsfw = true),
|
SingleLang("MikoRoku", "https://www.mikoroku.web.id", "id", isNsfw = true, overrideVersionCode = 1),
|
||||||
SingleLang("Mikrokosmos Fansub", "https://mikrokosmosfb.blogspot.com", "tr", isNsfw = true),
|
SingleLang("Mikrokosmos Fansub", "https://mikrokosmosfb.blogspot.com", "tr", isNsfw = true),
|
||||||
SingleLang("ShiyuraSub", "https://shiyurasub.blogspot.com", "id"),
|
SingleLang("ShiyuraSub", "https://shiyurasub.blogspot.com", "id"),
|
||||||
SingleLang("SobatManKu", "https://www.sobatmanku19.site", "id"),
|
SingleLang("SobatManKu", "https://www.sobatmanku19.site", "id"),
|
||||||
|
|
Loading…
Reference in New Issue