Update ZeistManga and fix some sources (#17533)
* Update ZeistManga and fix some sources * Move Noromax to MangaThemesia * Oops * Lint? * Lint T-T
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
|
@ -0,0 +1,11 @@
|
|||
package eu.kanade.tachiyomi.extension.id.noromax
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
|
||||
|
||||
class Noromax : MangaThemesia("Noromax", "https://noromax.my.id", "id", "/Komik") {
|
||||
|
||||
// Site changed from ZeistManga to MangaThemesia
|
||||
override val versionId = 2
|
||||
|
||||
override val hasProjectPage = true
|
||||
}
|
|
@ -1,39 +1,10 @@
|
|||
package eu.kanade.tachiyomi.extension.es.datgarscanlation
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.Language
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
|
||||
import org.jsoup.nodes.Document
|
||||
|
||||
class DatGarScanlation : ZeistManga("DatGarScanlation", "https://datgarscanlation.blogspot.com", "es") {
|
||||
|
||||
override val useNewChapterFeed = true
|
||||
override val hasFilters = true
|
||||
|
||||
private val altChapterFeedRegex = """label\s*=\s*'([^']+)'""".toRegex()
|
||||
private val altScriptSelector = "#latest > script"
|
||||
|
||||
override fun getApiUrl(doc: Document): String {
|
||||
var chapterRegex = chapterFeedRegex
|
||||
var script = doc.selectFirst(scriptSelector)
|
||||
|
||||
if (script == null) {
|
||||
script = doc.selectFirst(altScriptSelector)!!
|
||||
chapterRegex = altChapterFeedRegex
|
||||
}
|
||||
|
||||
val feed = chapterRegex
|
||||
.find(script.html())
|
||||
?.groupValues?.get(1)
|
||||
?: throw Exception("Failed to find chapter feed")
|
||||
|
||||
val url = apiUrl(feed)
|
||||
.addQueryParameter("start-index", "2") // Only get chapters
|
||||
.addQueryParameter("max-results", "999999") // Get all chapters
|
||||
.build()
|
||||
|
||||
return url.toString()
|
||||
}
|
||||
|
||||
override fun getLanguageList(): List<Language> = listOf(
|
||||
Language(intl.all, ""),
|
||||
)
|
||||
override val hasLanguageFilter = false
|
||||
}
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
package eu.kanade.tachiyomi.extension.ar.hijala
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.Genre
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.Language
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
|
||||
|
||||
class Hijala : ZeistManga("Hijala", "https://hijala.blogspot.com", "ar") {
|
||||
|
||||
override val hasFilters = true
|
||||
|
||||
override fun getLanguageList(): List<Language> = listOf(
|
||||
Language(intl.all, ""),
|
||||
)
|
||||
override val hasLanguageFilter = false
|
||||
|
||||
override fun getGenreList(): List<Genre> = listOf(
|
||||
Genre("أكشن", "Action"),
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
package eu.kanade.tachiyomi.extension.id.klmanhua
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.Language
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
|
||||
|
||||
class KLManhua : ZeistManga("KLManhua", "https://klmanhua.blogspot.com", "id") {
|
||||
|
||||
override val hasFilters = true
|
||||
|
||||
override fun getLanguageList(): List<Language> = listOf(
|
||||
Language(intl.all, ""),
|
||||
)
|
||||
override val hasLanguageFilter = false
|
||||
}
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
package eu.kanade.tachiyomi.extension.ar.mangaailand
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.Genre
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.Language
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
|
||||
|
||||
class MangaAiLand : ZeistManga("Manga Ai Land", "https://manga-ai-land.blogspot.com", "ar") {
|
||||
|
||||
override val hasFilters = true
|
||||
override val hasLanguageFilter = false
|
||||
|
||||
override fun getLanguageList(): List<Language> = listOf(
|
||||
Language(intl.all, ""),
|
||||
)
|
||||
override val chapterCategory = "فصل"
|
||||
|
||||
override fun getGenreList(): List<Genre> = listOf(
|
||||
Genre("تراجيدي", "تراجيدي"),
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
package eu.kanade.tachiyomi.extension.es.muslosnosekai
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.Language
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
|
||||
|
||||
class MuslosNoSekai : ZeistManga("Muslos No Sekai", "https://muslosnosekai.blogspot.com", "es") {
|
||||
|
||||
override val hasFilters = true
|
||||
|
||||
override fun getLanguageList(): List<Language> = listOf(
|
||||
Language(intl.all, ""),
|
||||
)
|
||||
override val hasLanguageFilter = false
|
||||
}
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
package eu.kanade.tachiyomi.extension.id.noromax
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
|
||||
|
||||
class Noromax : ZeistManga("Noromax", "https://www.noromax.xyz", "id") {
|
||||
|
||||
override val hasFilters = true
|
||||
}
|
|
@ -1,13 +1,25 @@
|
|||
package eu.kanade.tachiyomi.extension.id.shiyurasub
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.Language
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import okhttp3.Response
|
||||
|
||||
class ShiyuraSub : ZeistManga("ShiyuraSub", "https://shiyurasub.blogspot.com", "id") {
|
||||
|
||||
override val hasFilters = true
|
||||
override val hasLanguageFilter = false
|
||||
|
||||
override fun getLanguageList(): List<Language> = listOf(
|
||||
Language(intl.all, ""),
|
||||
)
|
||||
override val pageListSelector = "main.content article.container"
|
||||
|
||||
override fun mangaDetailsParse(response: Response): SManga {
|
||||
val document = response.asJsoup()
|
||||
val profileManga = document.selectFirst("main.content.post")!!
|
||||
return SManga.create().apply {
|
||||
thumbnail_url = profileManga.selectFirst("div.grid img")!!.attr("abs:src")
|
||||
description = profileManga.select("#synopsis").text()
|
||||
genre = profileManga.select("div.my-5 > a[rel=tag]")
|
||||
.joinToString { it.text() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import eu.kanade.tachiyomi.source.model.SChapter
|
|||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import okhttp3.Response
|
||||
import org.jsoup.nodes.Document
|
||||
|
||||
class Tooncubus : ZeistManga("Tooncubus", "https://www.tooncubus.top", "id") {
|
||||
|
||||
|
@ -25,7 +24,8 @@ class Tooncubus : ZeistManga("Tooncubus", "https://www.tooncubus.top", "id") {
|
|||
|
||||
override fun getChapterUrl(chapter: SChapter) = chapter.url
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga {
|
||||
override fun mangaDetailsParse(response: Response): SManga {
|
||||
val document = response.asJsoup()
|
||||
val profileManga = document.selectFirst(".grid.gtc-235fr")!!
|
||||
return SManga.create().apply {
|
||||
thumbnail_url = profileManga.selectFirst("img")!!.attr("src")
|
||||
|
|
|
@ -92,6 +92,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Ngomik", "https://ngomik.net", "id", overrideVersionCode = 2),
|
||||
SingleLang("NIGHT SCANS", "https://nightscans.org", "en", isNsfw = true, className = "NightScans", overrideVersionCode = 1),
|
||||
SingleLang("Nocturnal Scans", "https://nocturnalscans.com", "en", overrideVersionCode = 1),
|
||||
SingleLang("Noromax", "https://noromax.my.id", "id"),
|
||||
SingleLang("Origami Orpheans", "https://origami-orpheans.com.br", "pt-BR", overrideVersionCode = 9),
|
||||
SingleLang("Ozul Scans", "https://ozulscans.com", "ar"),
|
||||
SingleLang("Patatescans", "https://patatescans.com", "fr", isNsfw = true, overrideVersionCode = 2),
|
||||
|
|
|
@ -7,7 +7,7 @@ import eu.kanade.tachiyomi.source.model.MangasPage
|
|||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||
import eu.kanade.tachiyomi.source.online.HttpSource
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import kotlinx.serialization.decodeFromString
|
||||
import kotlinx.serialization.json.Json
|
||||
|
@ -16,138 +16,29 @@ import okhttp3.HttpUrl.Companion.toHttpUrl
|
|||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
|
||||
abstract class ZeistManga(
|
||||
override val name: String,
|
||||
override val baseUrl: String,
|
||||
override val lang: String,
|
||||
) : ParsedHttpSource() {
|
||||
) : HttpSource() {
|
||||
|
||||
override val supportsLatest = false
|
||||
open val hasFilters = false
|
||||
protected val json: Json by injectLazy()
|
||||
protected val intl by lazy { ZeistMangaIntl(lang) }
|
||||
|
||||
open val chapterFeedRegex = """clwd\.run\('([^']+)'""".toRegex()
|
||||
open val scriptSelector = "#clwd > script"
|
||||
private val json: Json by injectLazy()
|
||||
|
||||
open val oldChapterFeedRegex = """([^']+)\?""".toRegex()
|
||||
open val oldScriptSelector = "#myUL > script"
|
||||
private val intl by lazy { ZeistMangaIntl(lang) }
|
||||
|
||||
open val pageListSelector = "div.check-box div.separator"
|
||||
override fun popularMangaRequest(page: Int): Request {
|
||||
val startIndex = maxMangaResults * (page - 1) + 1
|
||||
val url = apiUrl()
|
||||
.addQueryParameter("orderby", "published")
|
||||
.addQueryParameter("max-results", (maxMangaResults + 1).toString())
|
||||
.addQueryParameter("start-index", startIndex.toString())
|
||||
.build()
|
||||
|
||||
open fun getApiUrl(doc: Document): String {
|
||||
val script = doc.selectFirst(scriptSelector)
|
||||
|
||||
if (script == null) {
|
||||
val altScript = doc.selectFirst(oldScriptSelector)!!.attr("src")
|
||||
val feed = oldChapterFeedRegex
|
||||
.find(altScript)
|
||||
?.groupValues?.get(1)
|
||||
?: throw Exception("Failed to find chapter feed")
|
||||
|
||||
return "$baseUrl$feed?alt=json&start-index=2&max-results=999999"
|
||||
}
|
||||
|
||||
val feed = chapterFeedRegex
|
||||
.find(script.html())
|
||||
?.groupValues?.get(1)
|
||||
?: throw Exception("Failed to find chapter feed")
|
||||
|
||||
return apiUrl("Chapter")
|
||||
.addPathSegments(feed)
|
||||
.addQueryParameter("max-results", "999999") // Get all chapters
|
||||
.build().toString()
|
||||
}
|
||||
|
||||
override fun chapterListParse(response: Response): List<SChapter> {
|
||||
val document = response.asJsoup()
|
||||
|
||||
val url = getApiUrl(document)
|
||||
|
||||
val req = GET(url, headers)
|
||||
val res = client.newCall(req).execute()
|
||||
|
||||
val jsonString = res.body.string()
|
||||
val result = json.decodeFromString<ZeistMangaDto>(jsonString)
|
||||
|
||||
return result.feed?.entry?.map { it.toSChapter(baseUrl) }
|
||||
?: throw Exception("Failed to parse from chapter API")
|
||||
}
|
||||
|
||||
override fun imageUrlParse(document: Document): String {
|
||||
throw UnsupportedOperationException("Not used.")
|
||||
}
|
||||
|
||||
override fun latestUpdatesParse(response: Response): MangasPage {
|
||||
throw UnsupportedOperationException("Not used.")
|
||||
}
|
||||
|
||||
override fun latestUpdatesRequest(page: Int): Request {
|
||||
throw UnsupportedOperationException("Not used.")
|
||||
}
|
||||
|
||||
override fun chapterFromElement(element: Element): SChapter {
|
||||
throw UnsupportedOperationException("Not used.")
|
||||
}
|
||||
|
||||
override fun chapterListSelector(): String {
|
||||
throw UnsupportedOperationException("Not used.")
|
||||
}
|
||||
|
||||
override fun latestUpdatesFromElement(element: Element): SManga {
|
||||
throw UnsupportedOperationException("Not used.")
|
||||
}
|
||||
|
||||
override fun latestUpdatesNextPageSelector(): String? {
|
||||
throw UnsupportedOperationException("Not used.")
|
||||
}
|
||||
|
||||
override fun latestUpdatesSelector(): String {
|
||||
throw UnsupportedOperationException("Not used.")
|
||||
}
|
||||
|
||||
override fun popularMangaFromElement(element: Element): SManga {
|
||||
throw UnsupportedOperationException("Not used.")
|
||||
}
|
||||
|
||||
override fun popularMangaNextPageSelector(): String? {
|
||||
throw UnsupportedOperationException("Not used.")
|
||||
}
|
||||
|
||||
override fun popularMangaSelector(): String {
|
||||
throw UnsupportedOperationException("Not used.")
|
||||
}
|
||||
|
||||
override fun searchMangaFromElement(element: Element): SManga {
|
||||
throw UnsupportedOperationException("Not used.")
|
||||
}
|
||||
|
||||
override fun searchMangaNextPageSelector(): String? {
|
||||
throw UnsupportedOperationException("Not used.")
|
||||
}
|
||||
|
||||
override fun searchMangaSelector(): String {
|
||||
throw UnsupportedOperationException("Not used.")
|
||||
}
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga {
|
||||
val profileManga = document.selectFirst(".grid.gtc-235fr")!!
|
||||
return SManga.create().apply {
|
||||
thumbnail_url = profileManga.selectFirst("img")!!.attr("src")
|
||||
description = profileManga.select("#synopsis").text()
|
||||
genre = profileManga.select("div.mt-15 > a[rel=tag]")
|
||||
.joinToString { it.text() }
|
||||
}
|
||||
}
|
||||
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
val images = document.select(pageListSelector)
|
||||
return images.select("img[src]").mapIndexed { i, img ->
|
||||
Page(i, "", img.attr("src"))
|
||||
}
|
||||
return GET(url, headers)
|
||||
}
|
||||
|
||||
override fun popularMangaParse(response: Response): MangasPage {
|
||||
|
@ -155,11 +46,12 @@ abstract class ZeistManga(
|
|||
val result = json.decodeFromString<ZeistMangaDto>(jsonString)
|
||||
|
||||
val mangas = result.feed?.entry.orEmpty()
|
||||
.filter { !it.category.orEmpty().any { category -> category.term == "Anime" } } // Skip animes
|
||||
.filter { it.category.orEmpty().any { category -> category.term == "Series" } }
|
||||
.filter { !it.category.orEmpty().any { category -> category.term == "Anime" } }
|
||||
.map { it.toSManga(baseUrl) }
|
||||
|
||||
val mangalist = mangas.toMutableList()
|
||||
if (mangas.size == maxResults + 1) {
|
||||
if (mangas.size == maxMangaResults + 1) {
|
||||
mangalist.removeLast()
|
||||
return MangasPage(mangalist, true)
|
||||
}
|
||||
|
@ -167,23 +59,13 @@ abstract class ZeistManga(
|
|||
return MangasPage(mangalist, false)
|
||||
}
|
||||
|
||||
override fun popularMangaRequest(page: Int): Request {
|
||||
val startIndex = maxResults * (page - 1) + 1
|
||||
val url = apiUrl()
|
||||
.addQueryParameter("orderby", "published")
|
||||
.addQueryParameter("max-results", (maxResults + 1).toString())
|
||||
.addQueryParameter("start-index", startIndex.toString())
|
||||
.build()
|
||||
|
||||
return GET(url, headers)
|
||||
}
|
||||
|
||||
override fun searchMangaParse(response: Response) = popularMangaParse(response)
|
||||
override fun latestUpdatesRequest(page: Int) = throw UnsupportedOperationException("Not used.")
|
||||
override fun latestUpdatesParse(response: Response) = throw UnsupportedOperationException("Not used.")
|
||||
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||
val startIndex = maxResults * (page - 1) + 1
|
||||
val startIndex = maxMangaResults * (page - 1) + 1
|
||||
val url = apiUrl()
|
||||
.addQueryParameter("max-results", (maxResults + 1).toString())
|
||||
.addQueryParameter("max-results", (maxMangaResults + 1).toString())
|
||||
.addQueryParameter("start-index", startIndex.toString())
|
||||
|
||||
if (query.isNotBlank()) {
|
||||
|
@ -221,28 +103,140 @@ abstract class ZeistManga(
|
|||
return GET(url.build(), headers)
|
||||
}
|
||||
|
||||
override fun searchMangaParse(response: Response) = popularMangaParse(response)
|
||||
|
||||
override fun mangaDetailsParse(response: Response): SManga {
|
||||
val document = response.asJsoup()
|
||||
val profileManga = document.selectFirst(".grid.gtc-235fr")!!
|
||||
return SManga.create().apply {
|
||||
thumbnail_url = profileManga.selectFirst("img")!!.attr("abs:src")
|
||||
description = profileManga.select("#synopsis").text()
|
||||
genre = profileManga.select("div.mt-15 > a[rel=tag]")
|
||||
.joinToString { it.text() }
|
||||
}
|
||||
}
|
||||
|
||||
protected open val chapterCategory = "Chapter"
|
||||
|
||||
override fun chapterListParse(response: Response): List<SChapter> {
|
||||
val document = response.asJsoup()
|
||||
|
||||
val url = getChapterFeedUrl(document)
|
||||
|
||||
val req = GET(url, headers)
|
||||
val res = client.newCall(req).execute()
|
||||
|
||||
val jsonString = res.body.string()
|
||||
val result = json.decodeFromString<ZeistMangaDto>(jsonString)
|
||||
|
||||
return result.feed?.entry?.filter { it.category.orEmpty().any { category -> category.term == chapterCategory } }
|
||||
?.map { it.toSChapter(baseUrl) }
|
||||
?: throw Exception("Failed to parse from chapter API")
|
||||
}
|
||||
|
||||
protected open val useNewChapterFeed = false
|
||||
protected open val useOldChapterFeed = false
|
||||
|
||||
private val chapterFeedRegex = """clwd\.run\('([^']+)'""".toRegex()
|
||||
private val scriptSelector = "#clwd > script"
|
||||
|
||||
open fun getChapterFeedUrl(doc: Document): String {
|
||||
if (useNewChapterFeed) return newChapterFeedUrl(doc)
|
||||
if (useOldChapterFeed) return oldChapterFeedUrl(doc)
|
||||
|
||||
val script = doc.selectFirst(scriptSelector)
|
||||
?: return runCatching { oldChapterFeedUrl(doc) }
|
||||
.getOrElse { newChapterFeedUrl(doc) }
|
||||
|
||||
val feed = chapterFeedRegex
|
||||
.find(script.html())
|
||||
?.groupValues?.get(1)
|
||||
?: throw Exception("Failed to find chapter feed")
|
||||
|
||||
return apiUrl(chapterCategory)
|
||||
.addPathSegments(feed)
|
||||
.addQueryParameter("max-results", maxChapterResults.toString())
|
||||
.build().toString()
|
||||
}
|
||||
|
||||
private val oldChapterFeedRegex = """([^']+)\?""".toRegex()
|
||||
private val oldScriptSelector = "#myUL > script"
|
||||
|
||||
open fun oldChapterFeedUrl(doc: Document): String {
|
||||
val script = doc.selectFirst(oldScriptSelector)!!.attr("src")
|
||||
val feed = oldChapterFeedRegex
|
||||
.find(script)
|
||||
?.groupValues?.get(1)
|
||||
?: throw Exception("Failed to find chapter feed")
|
||||
|
||||
return "$baseUrl$feed?alt=json&start-index=1&max-results=$maxChapterResults"
|
||||
}
|
||||
|
||||
private val newChapterFeedRegex = """label\s*=\s*'([^']+)'""".toRegex()
|
||||
private val newScriptSelector = "#latest > script"
|
||||
|
||||
private fun newChapterFeedUrl(doc: Document): String {
|
||||
var chapterRegex = chapterFeedRegex
|
||||
var script = doc.selectFirst(scriptSelector)
|
||||
|
||||
if (script == null) {
|
||||
script = doc.selectFirst(newScriptSelector)!!
|
||||
chapterRegex = newChapterFeedRegex
|
||||
}
|
||||
|
||||
val feed = chapterRegex
|
||||
.find(script.html())
|
||||
?.groupValues?.get(1)
|
||||
?: throw Exception("Failed to find chapter feed")
|
||||
|
||||
val url = apiUrl(feed)
|
||||
.addQueryParameter("start-index", "1")
|
||||
.addQueryParameter("max-results", "999999")
|
||||
.build()
|
||||
|
||||
return url.toString()
|
||||
}
|
||||
|
||||
open val pageListSelector = "div.check-box div.separator"
|
||||
|
||||
override fun pageListParse(response: Response): List<Page> {
|
||||
val document = response.asJsoup()
|
||||
val images = document.select(pageListSelector)
|
||||
return images.select("img[src]").mapIndexed { i, img ->
|
||||
Page(i, "", img.attr("abs:src"))
|
||||
}
|
||||
}
|
||||
|
||||
override fun imageUrlParse(response: Response) = throw UnsupportedOperationException("Not used.")
|
||||
|
||||
open fun apiUrl(feed: String = "Series"): HttpUrl.Builder {
|
||||
return "$baseUrl/feeds/posts/default/-/".toHttpUrl().newBuilder()
|
||||
.addPathSegment(feed)
|
||||
.addQueryParameter("alt", "json")
|
||||
}
|
||||
|
||||
protected open val hasFilters = false
|
||||
|
||||
protected open val hasStatusFilter = true
|
||||
protected open val hasTypeFilter = true
|
||||
protected open val hasLanguageFilter = true
|
||||
protected open val hasGenreFilter = true
|
||||
|
||||
override fun getFilterList(): FilterList {
|
||||
val filterList = mutableListOf<Filter<*>>()
|
||||
|
||||
if (!hasFilters) {
|
||||
return FilterList(emptyList())
|
||||
}
|
||||
|
||||
return FilterList(
|
||||
Filter.Header(intl.filterWarning),
|
||||
Filter.Separator(),
|
||||
StatusList(intl.statusFilterTitle, getStatusList()),
|
||||
TypeList(intl.typeFilterTitle, getTypeList()),
|
||||
LanguageList(intl.languageFilterTitle, getLanguageList()),
|
||||
GenreList(intl.genreFilterTitle, getGenreList()),
|
||||
)
|
||||
if (hasStatusFilter) filterList.add(StatusList(intl.statusFilterTitle, getStatusList()))
|
||||
if (hasTypeFilter) filterList.add(TypeList(intl.typeFilterTitle, getTypeList()))
|
||||
if (hasLanguageFilter) filterList.add(LanguageList(intl.languageFilterTitle, getLanguageList()))
|
||||
if (hasGenreFilter) filterList.add(GenreList(intl.genreFilterTitle, getGenreList()))
|
||||
|
||||
return FilterList(filterList)
|
||||
}
|
||||
|
||||
// Theme Default Status
|
||||
protected open fun getStatusList(): List<Status> = listOf(
|
||||
Status(intl.all, ""),
|
||||
Status(intl.statusOngoing, "Ongoing"),
|
||||
|
@ -253,7 +247,6 @@ abstract class ZeistManga(
|
|||
Status(intl.statusCancelled, "Cancelled"),
|
||||
)
|
||||
|
||||
// Theme Default Types
|
||||
protected open fun getTypeList(): List<Type> = listOf(
|
||||
Type(intl.all, ""),
|
||||
Type(intl.typeManga, "Manga"),
|
||||
|
@ -266,7 +259,6 @@ abstract class ZeistManga(
|
|||
Type(intl.typeDoujinshi, "Doujinshi"),
|
||||
)
|
||||
|
||||
// Theme Default Genres
|
||||
protected open fun getGenreList(): List<Genre> = listOf(
|
||||
Genre("Action", "Action"),
|
||||
Genre("Adventurer", "Adventurer"),
|
||||
|
@ -308,7 +300,6 @@ abstract class ZeistManga(
|
|||
Genre("Yuri", "Yuri"),
|
||||
)
|
||||
|
||||
// Theme Default Languages
|
||||
protected open fun getLanguageList(): List<Language> = listOf(
|
||||
Language(intl.all, ""),
|
||||
Language("Indonesian", "Indonesian"),
|
||||
|
@ -316,6 +307,7 @@ abstract class ZeistManga(
|
|||
)
|
||||
|
||||
companion object {
|
||||
private const val maxResults = 20
|
||||
private const val maxMangaResults = 20
|
||||
private const val maxChapterResults = 999999
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ class ZeistMangaGenerator : ThemeSourceGenerator {
|
|||
|
||||
override val themeClass = "ZeistManga"
|
||||
|
||||
override val baseVersionCode: Int = 6
|
||||
override val baseVersionCode: Int = 7
|
||||
|
||||
override val sources = listOf(
|
||||
SingleLang("Asupan Komik", "https://www.asupankomik.my.id", "id", overrideVersionCode = 1),
|
||||
|
@ -18,7 +18,6 @@ class ZeistMangaGenerator : ThemeSourceGenerator {
|
|||
SingleLang("KLManhua", "https://klmanhua.blogspot.com", "id", isNsfw = true),
|
||||
SingleLang("Manga Ai Land", "https://manga-ai-land.blogspot.com", "ar"),
|
||||
SingleLang("Muslos No Sekai", "https://muslosnosekai.blogspot.com", "es"),
|
||||
SingleLang("Noromax", "https://www.noromax.xyz", "id"),
|
||||
SingleLang("ShiyuraSub", "https://shiyurasub.blogspot.com", "id"),
|
||||
SingleLang("Tooncubus", "https://www.tooncubus.top", "id", isNsfw = true),
|
||||
)
|
||||
|
|