From 0a1b6b18d2c8b933b9975b705acbab33da5f631e Mon Sep 17 00:00:00 2001 From: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com> Date: Sat, 28 Oct 2023 20:45:11 +0500 Subject: [PATCH] Omega: use new query endpoint (#18765) OS: use new query endpoint & filters --- .../heancms/omegascans/src/OmegaScans.kt | 34 +++++++++++++++++-- .../multisrc/heancms/HeanCmsGenerator.kt | 2 +- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/multisrc/overrides/heancms/omegascans/src/OmegaScans.kt b/multisrc/overrides/heancms/omegascans/src/OmegaScans.kt index 99f555cd6..6daaec326 100644 --- a/multisrc/overrides/heancms/omegascans/src/OmegaScans.kt +++ b/multisrc/overrides/heancms/omegascans/src/OmegaScans.kt @@ -1,18 +1,48 @@ package eu.kanade.tachiyomi.extension.en.omegascans +import eu.kanade.tachiyomi.multisrc.heancms.Genre import eu.kanade.tachiyomi.multisrc.heancms.HeanCms import eu.kanade.tachiyomi.network.interceptor.rateLimitHost import okhttp3.HttpUrl.Companion.toHttpUrl -import okhttp3.OkHttpClient class OmegaScans : HeanCms("Omega Scans", "https://omegascans.org", "en") { - override val client: OkHttpClient = super.client.newBuilder() + override val client = super.client.newBuilder() .rateLimitHost(apiUrl.toHttpUrl(), 1) .build() + override val useNewQueryEndpoint = true + // Site changed from MangaThemesia to HeanCms. override val versionId = 2 override val coverPath = "" + + override fun getGenreList() = listOf( + Genre("Romance", 1), + Genre("Drama", 2), + Genre("Fantasy", 3), + Genre("Hardcore", 4), + Genre("SM", 5), + Genre("Harem", 8), + Genre("Hypnosis", 9), + Genre("Novel Adaptation", 10), + Genre("Netori", 11), + Genre("Netorare", 12), + Genre("Isekai", 13), + Genre("Yuri", 14), + Genre("MILF", 16), + Genre("Office", 17), + Genre("Short Story", 18), + Genre("Comedy", 19), + Genre("Campus", 20), + Genre("Crime", 21), + Genre("Revenge", 22), + Genre("Supernatural", 23), + Genre("Action", 24), + Genre("Military", 25), + Genre("Ability", 26), + Genre("Cohabitation", 27), + Genre("Training", 28), + ) } diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/heancms/HeanCmsGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/heancms/HeanCmsGenerator.kt index af5a8bc66..7e3b0b53c 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/heancms/HeanCmsGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/heancms/HeanCmsGenerator.kt @@ -13,7 +13,7 @@ class HeanCmsGenerator : ThemeSourceGenerator { override val sources = listOf( SingleLang("Glorious Scan", "https://gloriousscan.com", "pt-BR", overrideVersionCode = 17), - SingleLang("Omega Scans", "https://omegascans.org", "en", isNsfw = true, overrideVersionCode = 17), + SingleLang("Omega Scans", "https://omegascans.org", "en", isNsfw = true, overrideVersionCode = 18), SingleLang("Perf Scan", "https://perf-scan.fr", "fr"), SingleLang("Reaper Scans", "https://reaperscans.net", "pt-BR", overrideVersionCode = 36), SingleLang("YugenMangas", "https://yugenmangas.net", "es", isNsfw = true, overrideVersionCode = 9),