diff --git a/multisrc/overrides/madara/kenhuascan/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/madara/kenhuascan/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..41a43a180 Binary files /dev/null and b/multisrc/overrides/madara/kenhuascan/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/kenhuascan/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/madara/kenhuascan/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..15e26c1cd Binary files /dev/null and b/multisrc/overrides/madara/kenhuascan/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/kenhuascan/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/madara/kenhuascan/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..83d7f37d2 Binary files /dev/null and b/multisrc/overrides/madara/kenhuascan/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/kenhuascan/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/madara/kenhuascan/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..85628a4e8 Binary files /dev/null and b/multisrc/overrides/madara/kenhuascan/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/kenhuascan/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/madara/kenhuascan/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..16339d8f4 Binary files /dev/null and b/multisrc/overrides/madara/kenhuascan/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/kenhuascan/res/web_hi_res_512.png b/multisrc/overrides/madara/kenhuascan/res/web_hi_res_512.png new file mode 100644 index 000000000..1d0dc80ea Binary files /dev/null and b/multisrc/overrides/madara/kenhuascan/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/madara/kenhuascan/src/KenhuaScan.kt b/multisrc/overrides/madara/kenhuascan/src/KenhuaScan.kt new file mode 100644 index 000000000..e16f7c6ad --- /dev/null +++ b/multisrc/overrides/madara/kenhuascan/src/KenhuaScan.kt @@ -0,0 +1,60 @@ +package eu.kanade.tachiyomi.extension.es.kenhuascan + +import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.network.POST +import eu.kanade.tachiyomi.network.interceptor.rateLimit +import okhttp3.FormBody +import okhttp3.OkHttpClient +import okhttp3.Request +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class KenhuaScan : Madara( + "KenhuaScan", + "https://kenhuav2scan.com", + "es", + dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale("es")), +) { + override val client: OkHttpClient = super.client.newBuilder() + .rateLimit(2, 1, TimeUnit.SECONDS) + .build() + + override val useNewChapterEndpoint = true + + override fun popularMangaNextPageSelector() = "body:not(:has(.no-posts))" + + private fun loadMoreRequest(page: Int, metaKey: String): Request { + val formBody = FormBody.Builder().apply { + add("action", "madara_load_more") + add("page", page.toString()) + add("template", "madara-core/content/content-archive") + add("vars[paged]", "1") + add("vars[orderby]", "meta_value_num") + add("vars[template]", "archive") + add("vars[sidebar]", "full") + add("vars[post_type]", "wp-manga") + add("vars[post_status]", "publish") + add("vars[meta_key]", metaKey) + add("vars[order]", "desc") + add("vars[meta_query][relation]", "AND") + add("vars[manga_archives_item_layout]", "big_thumbnail") + }.build() + + val xhrHeaders = headersBuilder() + .add("Content-Length", formBody.contentLength().toString()) + .add("Content-Type", formBody.contentType().toString()) + .add("X-Requested-With", "XMLHttpRequest") + .build() + + return POST("$baseUrl/wp-admin/admin-ajax.php", xhrHeaders, formBody) + } + + override fun popularMangaRequest(page: Int): Request { + return loadMoreRequest(page - 1, "_wp_manga_views") + } + + override fun latestUpdatesRequest(page: Int): Request { + return loadMoreRequest(page - 1, "_latest_update") + } +} diff --git a/multisrc/overrides/madara/lectormangalat/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/madara/lectormangalat/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..787e28969 Binary files /dev/null and b/multisrc/overrides/madara/lectormangalat/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/lectormangalat/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/madara/lectormangalat/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..51c94c2f0 Binary files /dev/null and b/multisrc/overrides/madara/lectormangalat/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/lectormangalat/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/madara/lectormangalat/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..7c6027c20 Binary files /dev/null and b/multisrc/overrides/madara/lectormangalat/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/lectormangalat/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/madara/lectormangalat/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..09777183f Binary files /dev/null and b/multisrc/overrides/madara/lectormangalat/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/lectormangalat/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/madara/lectormangalat/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..3e0e38ab4 Binary files /dev/null and b/multisrc/overrides/madara/lectormangalat/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/lectormangalat/res/web_hi_res_512.png b/multisrc/overrides/madara/lectormangalat/res/web_hi_res_512.png new file mode 100644 index 000000000..a1283b4ac Binary files /dev/null and b/multisrc/overrides/madara/lectormangalat/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/madara/lectormangalat/src/LectorMangaLat.kt b/multisrc/overrides/madara/lectormangalat/src/LectorMangaLat.kt new file mode 100644 index 000000000..2d963c9cf --- /dev/null +++ b/multisrc/overrides/madara/lectormangalat/src/LectorMangaLat.kt @@ -0,0 +1,75 @@ +package eu.kanade.tachiyomi.extension.es.lectormangalat + +import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.network.POST +import eu.kanade.tachiyomi.network.interceptor.rateLimit +import okhttp3.FormBody +import okhttp3.OkHttpClient +import okhttp3.Request +import org.jsoup.nodes.Element +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class LectorMangaLat : Madara( + "LectorManga.lat", + "https://www.lectormanga.lat", + "es", + dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale("es")), +) { + override val client: OkHttpClient = super.client.newBuilder() + .rateLimit(2, 1, TimeUnit.SECONDS) + .build() + + override val mangaSubString = "biblioteca" + + override val useNewChapterEndpoint = true + + override fun popularMangaNextPageSelector() = "body:not(:has(.no-posts))" + + private fun loadMoreRequest(page: Int, metaKey: String): Request { + val formBody = FormBody.Builder().apply { + add("action", "madara_load_more") + add("page", page.toString()) + add("template", "madara-core/content/content-archive") + add("vars[paged]", "1") + add("vars[orderby]", "meta_value_num") + add("vars[template]", "archive") + add("vars[sidebar]", "full") + add("vars[post_type]", "wp-manga") + add("vars[post_status]", "publish") + add("vars[meta_key]", metaKey) + add("vars[order]", "desc") + add("vars[meta_query][relation]", "AND") + add("vars[manga_archives_item_layout]", "big_thumbnail") + }.build() + + val xhrHeaders = headersBuilder() + .add("Content-Length", formBody.contentLength().toString()) + .add("Content-Type", formBody.contentType().toString()) + .add("X-Requested-With", "XMLHttpRequest") + .build() + + return POST("$baseUrl/wp-admin/admin-ajax.php", xhrHeaders, formBody) + } + + override fun popularMangaRequest(page: Int): Request { + return loadMoreRequest(page - 1, "_wp_manga_views") + } + + override fun latestUpdatesRequest(page: Int): Request { + return loadMoreRequest(page - 1, "_latest_update") + } + + override val pageListParseSelector = "div.reading-content div.page-break > img" + + override fun imageFromElement(element: Element): String? { + return when { + element.hasAttr("data-cfsrc") -> element.attr("abs:data-cfsrc") + element.hasAttr("data-src") -> element.attr("abs:data-src") + element.hasAttr("data-lazy-src") -> element.attr("abs:data-lazy-src") + element.hasAttr("srcset") -> element.attr("abs:srcset").substringBefore(" ") + else -> element.attr("abs:src") + } + } +} 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 3f5e9856d..5dae69a2e 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 @@ -170,6 +170,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Karatcam Scans", "https://karatcam-scans.fr", "fr", isNsfw = true), SingleLang("Kataitake", "https://www.kataitake.fr", "fr", isNsfw = true), SingleLang("KawaScans", "https://kawascans.com", "en", overrideVersionCode = 1), + SingleLang("KenhuaScan", "https://kenhuav2scan.com", "es"), SingleLang("Kings-Manga", "https://www.kings-manga.co", "th", isNsfw = false, className = "KingsManga"), SingleLang("Kissmanga.in", "https://kissmanga.in", "en", className = "KissmangaIn", overrideVersionCode = 3), SingleLang("KlikManga", "https://klikmanga.id", "id", overrideVersionCode = 2), @@ -184,6 +185,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Lara Manga", "https://laramanga.love", "en", overrideVersionCode = 1), SingleLang("Last Knight Translation", "https://lkscanlation.com", "es", isNsfw = true, className = "LKScanlation"), SingleLang("Lector Online", "https://lectorunm.life", "es", isNsfw = true, className = "Ikifeng", overrideVersionCode = 1), + SingleLang("LectorManga.lat", "https://www.lectormanga.lat", "es", isNsfw = true, pkgName = "lectormangalat", className = "LectorMangaLat"), SingleLang("Ler Yaoi", "https://leryaoi.com", "pt-BR", isNsfw = true), SingleLang("Leviatan Scans", "https://lscomic.com", "en", overrideVersionCode = 15), SingleLang("LHTranslation", "https://lhtranslation.net", "en", overrideVersionCode = 1),