diff --git a/multisrc/overrides/zeistmanga/noromax/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/noromax/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/zeistmanga/noromax/res/mipmap-hdpi/ic_launcher.png rename to multisrc/overrides/mangathemesia/noromax/res/mipmap-hdpi/ic_launcher.png diff --git a/multisrc/overrides/zeistmanga/noromax/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/noromax/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/zeistmanga/noromax/res/mipmap-mdpi/ic_launcher.png rename to multisrc/overrides/mangathemesia/noromax/res/mipmap-mdpi/ic_launcher.png diff --git a/multisrc/overrides/zeistmanga/noromax/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/noromax/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/zeistmanga/noromax/res/mipmap-xhdpi/ic_launcher.png rename to multisrc/overrides/mangathemesia/noromax/res/mipmap-xhdpi/ic_launcher.png diff --git a/multisrc/overrides/zeistmanga/noromax/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/noromax/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/zeistmanga/noromax/res/mipmap-xxhdpi/ic_launcher.png rename to multisrc/overrides/mangathemesia/noromax/res/mipmap-xxhdpi/ic_launcher.png diff --git a/multisrc/overrides/zeistmanga/noromax/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/noromax/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/zeistmanga/noromax/res/mipmap-xxxhdpi/ic_launcher.png rename to multisrc/overrides/mangathemesia/noromax/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/multisrc/overrides/zeistmanga/noromax/res/web_hi_res_512.png b/multisrc/overrides/mangathemesia/noromax/res/web_hi_res_512.png similarity index 100% rename from multisrc/overrides/zeistmanga/noromax/res/web_hi_res_512.png rename to multisrc/overrides/mangathemesia/noromax/res/web_hi_res_512.png diff --git a/multisrc/overrides/mangathemesia/noromax/src/Noromax.kt b/multisrc/overrides/mangathemesia/noromax/src/Noromax.kt new file mode 100644 index 000000000..144bf7e0a --- /dev/null +++ b/multisrc/overrides/mangathemesia/noromax/src/Noromax.kt @@ -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 +} diff --git a/multisrc/overrides/zeistmanga/datgarscanlation/src/DatGarScanlation.kt b/multisrc/overrides/zeistmanga/datgarscanlation/src/DatGarScanlation.kt index 1f9e3d960..96ebad5aa 100644 --- a/multisrc/overrides/zeistmanga/datgarscanlation/src/DatGarScanlation.kt +++ b/multisrc/overrides/zeistmanga/datgarscanlation/src/DatGarScanlation.kt @@ -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 = listOf( - Language(intl.all, ""), - ) + override val hasLanguageFilter = false } diff --git a/multisrc/overrides/zeistmanga/hijala/src/Hijala.kt b/multisrc/overrides/zeistmanga/hijala/src/Hijala.kt index a2920a9e8..0747effa3 100644 --- a/multisrc/overrides/zeistmanga/hijala/src/Hijala.kt +++ b/multisrc/overrides/zeistmanga/hijala/src/Hijala.kt @@ -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 = listOf( - Language(intl.all, ""), - ) + override val hasLanguageFilter = false override fun getGenreList(): List = listOf( Genre("أكشن", "Action"), diff --git a/multisrc/overrides/zeistmanga/klmanhua/src/KLManhua.kt b/multisrc/overrides/zeistmanga/klmanhua/src/KLManhua.kt index 8b34b50b1..dc150c022 100644 --- a/multisrc/overrides/zeistmanga/klmanhua/src/KLManhua.kt +++ b/multisrc/overrides/zeistmanga/klmanhua/src/KLManhua.kt @@ -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 = listOf( - Language(intl.all, ""), - ) + override val hasLanguageFilter = false } diff --git a/multisrc/overrides/zeistmanga/mangaailand/src/MangaAiLand.kt b/multisrc/overrides/zeistmanga/mangaailand/src/MangaAiLand.kt index 406781b85..3f87781c2 100644 --- a/multisrc/overrides/zeistmanga/mangaailand/src/MangaAiLand.kt +++ b/multisrc/overrides/zeistmanga/mangaailand/src/MangaAiLand.kt @@ -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 = listOf( - Language(intl.all, ""), - ) + override val chapterCategory = "فصل" override fun getGenreList(): List = listOf( Genre("تراجيدي", "تراجيدي"), diff --git a/multisrc/overrides/zeistmanga/muslosnosekai/src/MuslosNoSekai.kt b/multisrc/overrides/zeistmanga/muslosnosekai/src/MuslosNoSekai.kt index fbee9f9d9..bd610d3ad 100644 --- a/multisrc/overrides/zeistmanga/muslosnosekai/src/MuslosNoSekai.kt +++ b/multisrc/overrides/zeistmanga/muslosnosekai/src/MuslosNoSekai.kt @@ -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 = listOf( - Language(intl.all, ""), - ) + override val hasLanguageFilter = false } diff --git a/multisrc/overrides/zeistmanga/noromax/src/Noromax.kt b/multisrc/overrides/zeistmanga/noromax/src/Noromax.kt deleted file mode 100644 index 3a535ea84..000000000 --- a/multisrc/overrides/zeistmanga/noromax/src/Noromax.kt +++ /dev/null @@ -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 -} diff --git a/multisrc/overrides/zeistmanga/shiyurasub/src/ShiyuraSub.kt b/multisrc/overrides/zeistmanga/shiyurasub/src/ShiyuraSub.kt index 38870cc9e..313098d16 100644 --- a/multisrc/overrides/zeistmanga/shiyurasub/src/ShiyuraSub.kt +++ b/multisrc/overrides/zeistmanga/shiyurasub/src/ShiyuraSub.kt @@ -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 = 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() } + } + } } diff --git a/multisrc/overrides/zeistmanga/tooncubus/src/Tooncubus.kt b/multisrc/overrides/zeistmanga/tooncubus/src/Tooncubus.kt index fa681425b..1af369651 100644 --- a/multisrc/overrides/zeistmanga/tooncubus/src/Tooncubus.kt +++ b/multisrc/overrides/zeistmanga/tooncubus/src/Tooncubus.kt @@ -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") diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt index eddadddc4..87f132481 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt @@ -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), diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/zeistmanga/ZeistManga.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/zeistmanga/ZeistManga.kt index 42334dfa7..94ed9f4d7 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/zeistmanga/ZeistManga.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/zeistmanga/ZeistManga.kt @@ -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 { - 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(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 { - 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(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 { + 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(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 { + 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>() + 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 = 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 = 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 = 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 = 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 } } diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/zeistmanga/ZeistMangaGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/zeistmanga/ZeistMangaGenerator.kt index 575d77ea2..ef894c627 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/zeistmanga/ZeistMangaGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/zeistmanga/ZeistMangaGenerator.kt @@ -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), )