MagComi: fix search and collection (#10790)

fix search and collection
This commit is contained in:
manti 2025-10-01 09:29:37 +02:00 committed by Draff
parent 5fdd51e172
commit 9a738a668f
Signed by: Draff
GPG Key ID: E8A89F3211677653
2 changed files with 14 additions and 2 deletions

View File

@ -3,7 +3,7 @@ ext {
extClass = '.MagComi'
themePkg = 'gigaviewer'
baseUrl = 'https://magcomi.com'
overrideVersionCode = 1
overrideVersionCode = 2
isNsfw = false
}

View File

@ -29,7 +29,19 @@ class MagComi : GigaViewer(
setUrlWithoutDomain(element.attr("href"))
}
override fun searchMangaSelector(): String = "li[class^=SearchResultItem_li__]"
override fun searchMangaFromElement(element: Element): SManga = SManga.create().apply {
val link = element.selectFirst("a")!!
setUrlWithoutDomain(link.attr("href"))
title = element.selectFirst("p[class^=SearchResultItem_series_title__]")!!.text()
thumbnail_url = link.selectFirst("img")?.attr("src")
}
override fun getCollections(): List<Collection> = listOf(
Collection("連載・読切", ""),
Collection("連載中", ""),
Collection("読切", "oneshot"),
Collection("漫画賞・他", "award_other"),
Collection("完結・休止", "finished"),
)
}