From ecd137d21addf5f9c2290eee6c45921ec33e89df Mon Sep 17 00:00:00 2001 From: FlaminSarge Date: Mon, 27 Feb 2023 11:33:29 -0700 Subject: [PATCH] [KSGroupScans] Migrate from FMReader to Madara (#15332) --- .../fmreader/ksgroupscans/src/KSGroupScans.kt | 18 ------------------ .../res/mipmap-hdpi/ic_launcher.png | Bin .../res/mipmap-mdpi/ic_launcher.png | Bin .../res/mipmap-xhdpi/ic_launcher.png | Bin .../res/mipmap-xxhdpi/ic_launcher.png | Bin .../res/mipmap-xxxhdpi/ic_launcher.png | Bin .../ksgroupscans/res/web_hi_res_512.png | Bin .../madara/ksgroupscans/src/KSGroupScans.kt | 8 ++++++++ .../multisrc/fmreader/FMReaderGenerator.kt | 1 - .../multisrc/madara/MadaraGenerator.kt | 1 + 10 files changed, 9 insertions(+), 19 deletions(-) delete mode 100644 multisrc/overrides/fmreader/ksgroupscans/src/KSGroupScans.kt rename multisrc/overrides/{fmreader => madara}/ksgroupscans/res/mipmap-hdpi/ic_launcher.png (100%) rename multisrc/overrides/{fmreader => madara}/ksgroupscans/res/mipmap-mdpi/ic_launcher.png (100%) rename multisrc/overrides/{fmreader => madara}/ksgroupscans/res/mipmap-xhdpi/ic_launcher.png (100%) rename multisrc/overrides/{fmreader => madara}/ksgroupscans/res/mipmap-xxhdpi/ic_launcher.png (100%) rename multisrc/overrides/{fmreader => madara}/ksgroupscans/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename multisrc/overrides/{fmreader => madara}/ksgroupscans/res/web_hi_res_512.png (100%) create mode 100644 multisrc/overrides/madara/ksgroupscans/src/KSGroupScans.kt diff --git a/multisrc/overrides/fmreader/ksgroupscans/src/KSGroupScans.kt b/multisrc/overrides/fmreader/ksgroupscans/src/KSGroupScans.kt deleted file mode 100644 index a87dbd093..000000000 --- a/multisrc/overrides/fmreader/ksgroupscans/src/KSGroupScans.kt +++ /dev/null @@ -1,18 +0,0 @@ -package eu.kanade.tachiyomi.extension.en.ksgroupscans - -import eu.kanade.tachiyomi.multisrc.fmreader.FMReader -import eu.kanade.tachiyomi.source.model.SChapter -import org.jsoup.nodes.Element - -class KSGroupScans : FMReader("KSGroupScans", "https://ksgroupscans.com", "en") { - override fun popularMangaNextPageSelector() = ".pagination > li:last-child > a:not(.active)" - - override fun chapterFromElement(element: Element, mangaTitle: String): SChapter { - return SChapter.create().apply { - element.select(chapterUrlSelector).first()!!.let { - setUrlWithoutDomain(it.attr("abs:href")) - name = element.select(".chapter-name").text() - } - } - } -} diff --git a/multisrc/overrides/fmreader/ksgroupscans/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/madara/ksgroupscans/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/fmreader/ksgroupscans/res/mipmap-hdpi/ic_launcher.png rename to multisrc/overrides/madara/ksgroupscans/res/mipmap-hdpi/ic_launcher.png diff --git a/multisrc/overrides/fmreader/ksgroupscans/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/madara/ksgroupscans/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/fmreader/ksgroupscans/res/mipmap-mdpi/ic_launcher.png rename to multisrc/overrides/madara/ksgroupscans/res/mipmap-mdpi/ic_launcher.png diff --git a/multisrc/overrides/fmreader/ksgroupscans/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/madara/ksgroupscans/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/fmreader/ksgroupscans/res/mipmap-xhdpi/ic_launcher.png rename to multisrc/overrides/madara/ksgroupscans/res/mipmap-xhdpi/ic_launcher.png diff --git a/multisrc/overrides/fmreader/ksgroupscans/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/madara/ksgroupscans/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/fmreader/ksgroupscans/res/mipmap-xxhdpi/ic_launcher.png rename to multisrc/overrides/madara/ksgroupscans/res/mipmap-xxhdpi/ic_launcher.png diff --git a/multisrc/overrides/fmreader/ksgroupscans/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/madara/ksgroupscans/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/fmreader/ksgroupscans/res/mipmap-xxxhdpi/ic_launcher.png rename to multisrc/overrides/madara/ksgroupscans/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/multisrc/overrides/fmreader/ksgroupscans/res/web_hi_res_512.png b/multisrc/overrides/madara/ksgroupscans/res/web_hi_res_512.png similarity index 100% rename from multisrc/overrides/fmreader/ksgroupscans/res/web_hi_res_512.png rename to multisrc/overrides/madara/ksgroupscans/res/web_hi_res_512.png diff --git a/multisrc/overrides/madara/ksgroupscans/src/KSGroupScans.kt b/multisrc/overrides/madara/ksgroupscans/src/KSGroupScans.kt new file mode 100644 index 000000000..223fd709a --- /dev/null +++ b/multisrc/overrides/madara/ksgroupscans/src/KSGroupScans.kt @@ -0,0 +1,8 @@ +package eu.kanade.tachiyomi.extension.en.ksgroupscans + +import eu.kanade.tachiyomi.multisrc.madara.Madara + +class KSGroupScans : Madara("KSGroupScans", "https://ksgroupscans.com", "en") { + override val versionId = 2 + override val useNewChapterEndpoint = true +} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/fmreader/FMReaderGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/fmreader/FMReaderGenerator.kt index 4aca3f337..3f9996d17 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/fmreader/FMReaderGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/fmreader/FMReaderGenerator.kt @@ -16,7 +16,6 @@ class FMReaderGenerator : ThemeSourceGenerator { MultiLang("Manhwa18.net", "https://manhwa18.net", listOf("en", "ko"), className = "Manhwa18NetFactory", isNsfw = true), SingleLang("Epik Manga", "https://www.epikmanga.com", "tr"), SingleLang("KissLove", "https://klmanga.com", "ja", overrideVersionCode = 2), - SingleLang("KSGroupScans", "https://ksgroupscans.com", "en", overrideVersionCode = 2), SingleLang("Manga-TR", "https://manga-tr.com", "tr", className = "MangaTR", overrideVersionCode = 1), SingleLang("ManhuaRock", "https://manhuarock.net", "vi", overrideVersionCode = 1), SingleLang("Manhwa18", "https://manhwa18.com", "en", isNsfw = true, overrideVersionCode = 2), 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 a1dbebd96..7e32d5e84 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 @@ -164,6 +164,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Kissmanga.in", "https://kissmanga.in", "en", className = "KissmangaIn", overrideVersionCode = 2), SingleLang("KlikManga", "https://klikmanga.id", "id", overrideVersionCode = 2), SingleLang("KomikRame", "https://komikra.me", "id"), + SingleLang("KSGroupScans", "https://ksgroupscans.com", "en"), SingleLang("Kun Manga", "https://kunmanga.com", "en", overrideVersionCode = 1), SingleLang("Lady Manga", "https://ladymanga.com", "en"), SingleLang("Lala Manga", "https://lalamanga.com", "en", isNsfw = true),