From 852a6896692d25f0563bbed1a10235e7d7f07f5f Mon Sep 17 00:00:00 2001 From: Vetle Ledaal Date: Sat, 22 Jul 2023 22:00:34 +0200 Subject: [PATCH] Move Zahard from MMRCMS to MangaThemesia (#17225) * Move Zahard from MMRCMS to MangaThemesia * Update multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> --------- Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> --- .../zahard/res/mipmap-hdpi/ic_launcher.png | Bin .../zahard/res/mipmap-mdpi/ic_launcher.png | Bin .../zahard/res/mipmap-xhdpi/ic_launcher.png | Bin .../zahard/res/mipmap-xxhdpi/ic_launcher.png | Bin .../zahard/res/mipmap-xxxhdpi/ic_launcher.png | Bin .../zahard/res/web_hi_res_512.png | Bin .../mangathemesia/zahard/src/Zahard.kt | 36 ++++++++++++++++++ .../mangathemesia/MangaThemesiaGenerator.kt | 1 + .../multisrc/mmrcms/MMRCMSGenerator.kt | 1 - 9 files changed, 37 insertions(+), 1 deletion(-) rename multisrc/overrides/{mmrcms => mangathemesia}/zahard/res/mipmap-hdpi/ic_launcher.png (100%) rename multisrc/overrides/{mmrcms => mangathemesia}/zahard/res/mipmap-mdpi/ic_launcher.png (100%) rename multisrc/overrides/{mmrcms => mangathemesia}/zahard/res/mipmap-xhdpi/ic_launcher.png (100%) rename multisrc/overrides/{mmrcms => mangathemesia}/zahard/res/mipmap-xxhdpi/ic_launcher.png (100%) rename multisrc/overrides/{mmrcms => mangathemesia}/zahard/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename multisrc/overrides/{mmrcms => mangathemesia}/zahard/res/web_hi_res_512.png (100%) create mode 100644 multisrc/overrides/mangathemesia/zahard/src/Zahard.kt diff --git a/multisrc/overrides/mmrcms/zahard/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/zahard/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/mmrcms/zahard/res/mipmap-hdpi/ic_launcher.png rename to multisrc/overrides/mangathemesia/zahard/res/mipmap-hdpi/ic_launcher.png diff --git a/multisrc/overrides/mmrcms/zahard/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/zahard/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/mmrcms/zahard/res/mipmap-mdpi/ic_launcher.png rename to multisrc/overrides/mangathemesia/zahard/res/mipmap-mdpi/ic_launcher.png diff --git a/multisrc/overrides/mmrcms/zahard/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/zahard/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/mmrcms/zahard/res/mipmap-xhdpi/ic_launcher.png rename to multisrc/overrides/mangathemesia/zahard/res/mipmap-xhdpi/ic_launcher.png diff --git a/multisrc/overrides/mmrcms/zahard/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/zahard/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/mmrcms/zahard/res/mipmap-xxhdpi/ic_launcher.png rename to multisrc/overrides/mangathemesia/zahard/res/mipmap-xxhdpi/ic_launcher.png diff --git a/multisrc/overrides/mmrcms/zahard/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/zahard/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/mmrcms/zahard/res/mipmap-xxxhdpi/ic_launcher.png rename to multisrc/overrides/mangathemesia/zahard/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/multisrc/overrides/mmrcms/zahard/res/web_hi_res_512.png b/multisrc/overrides/mangathemesia/zahard/res/web_hi_res_512.png similarity index 100% rename from multisrc/overrides/mmrcms/zahard/res/web_hi_res_512.png rename to multisrc/overrides/mangathemesia/zahard/res/web_hi_res_512.png diff --git a/multisrc/overrides/mangathemesia/zahard/src/Zahard.kt b/multisrc/overrides/mangathemesia/zahard/src/Zahard.kt new file mode 100644 index 000000000..641e9093c --- /dev/null +++ b/multisrc/overrides/mangathemesia/zahard/src/Zahard.kt @@ -0,0 +1,36 @@ +package eu.kanade.tachiyomi.extension.en.zahard + +import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia +import eu.kanade.tachiyomi.network.GET +import eu.kanade.tachiyomi.source.model.FilterList +import okhttp3.HttpUrl.Companion.toHttpUrl +import okhttp3.Request + +class Zahard : MangaThemesia( + "Zahard", + "https://zahard.xyz", + "en", + mangaUrlDirectory = "/library", +) { + override val versionId = 2 + + override val supportsLatest = false + + override val pageSelector = "div#chapter_imgs img" + + override fun searchMangaNextPageSelector() = "a[rel=next]" + + override fun chapterListSelector() = "#chapterlist > ul > a" + + override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { + val url = baseUrl.toHttpUrl().newBuilder() + .addPathSegment(mangaUrlDirectory.substring(1)) + .addQueryParameter("search", query) + .addQueryParameter("page", page.toString()) + .build() + + return GET(url, headers) + } + + override fun getFilterList() = FilterList() +} 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 311c833eb..b78645b2a 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 @@ -126,6 +126,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator { SingleLang("West Manga", "https://westmanga.info", "id", overrideVersionCode = 1), SingleLang("World Romance Translation", "https://wrt.my.id", "id", overrideVersionCode = 10), SingleLang("xCaliBR Scans", "https://xcalibrscans.com", "en", overrideVersionCode = 4), + SingleLang("Zahard", "https://zahard.xyz", "en"), SingleLang("สดใสเมะ", "https://www.xn--l3c0azab5a2gta.com", "th", isNsfw = true, className = "Sodsaime", overrideVersionCode = 1), ) diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mmrcms/MMRCMSGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mmrcms/MMRCMSGenerator.kt index 411a1f1ba..66ce5df3d 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mmrcms/MMRCMSGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mmrcms/MMRCMSGenerator.kt @@ -15,7 +15,6 @@ class MMRCMSGenerator : ThemeSourceGenerator { SingleLang("مانجا اون لاين", "https://onma.top", "ar", className = "onma"), SingleLang("Read Comics Online", "https://readcomicsonline.ru", "en"), SingleLang("Fallen Angels", "https://manga.fascans.com", "en", overrideVersionCode = 2), - SingleLang("Zahard", "https://zahard.xyz", "en", overrideVersionCode = 2), SingleLang("Scan FR", "https://www.scan-fr.org", "fr", overrideVersionCode = 2), SingleLang("Scan VF", "https://www.scan-vf.net", "fr", overrideVersionCode = 1), SingleLang("Komikid", "https://www.komikid.com", "id"),