diff --git a/multisrc/overrides/madara/mangasnosekai/src/MangasNoSekai.kt b/multisrc/overrides/madara/mangasnosekai/src/MangasNoSekai.kt index 4015fbef1..0a84b8933 100644 --- a/multisrc/overrides/madara/mangasnosekai/src/MangasNoSekai.kt +++ b/multisrc/overrides/madara/mangasnosekai/src/MangasNoSekai.kt @@ -1,10 +1,13 @@ package eu.kanade.tachiyomi.extension.es.mangasnosekai import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.interceptor.rateLimitHost import eu.kanade.tachiyomi.source.model.SManga import okhttp3.HttpUrl.Companion.toHttpUrl +import okhttp3.Request import org.jsoup.nodes.Document +import org.jsoup.nodes.Element import java.text.SimpleDateFormat import java.util.Locale @@ -20,6 +23,22 @@ class MangasNoSekai : Madara( override val useNewChapterEndpoint = true + override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/${searchPage(page)}?s=&post_type=wp-manga&m_orderby=views", headers) + + override fun popularMangaSelector() = searchMangaSelector() + + override fun popularMangaFromElement(element: Element) = searchMangaFromElement(element) + + override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/${searchPage(page)}?s=&post_type=wp-manga&m_orderby=latest", headers) + + override fun latestUpdatesSelector() = searchMangaSelector() + + override fun latestUpdatesFromElement(element: Element) = searchMangaFromElement(element) + + override fun searchPage(page: Int): String { + return if (page > 1) "page/$page/" else "" + } + override fun searchMangaNextPageSelector() = "nav.navigation a.next" override val mangaDetailsSelectorTitle = "div.summary-content h1.titleManga" diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt index 8053295de..5f6dfd71a 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt @@ -289,7 +289,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("MangaRosie", "https://mangarosie.in", "en", isNsfw = true), SingleLang("MangaRuby.com", "https://mangaruby.com", "en", isNsfw = true, className = "MangaRubyCom"), SingleLang("Mangaryu", "https://mangaryu.com", "en", isNsfw = true), - SingleLang("Mangas No Sekai", "https://mangasnosekai.com", "es"), + SingleLang("Mangas No Sekai", "https://mangasnosekai.com", "es", overrideVersionCode = 1), SingleLang("Mangas Origines", "https://mangas-origines.xyz", "fr", isNsfw = true, overrideVersionCode = 4), SingleLang("Mangas-Origines.fr", "https://mangas-origines.fr", "fr", className = "MangasOriginesFr"), SingleLang("MangaSco", "https://manhwasco.net", "en", overrideVersionCode = 2),