diff --git a/multisrc/overrides/madara/atlantisscan/src/AtlantisScan.kt b/multisrc/overrides/madara/atlantisscan/src/AtlantisScan.kt new file mode 100644 index 000000000..e80af1c91 --- /dev/null +++ b/multisrc/overrides/madara/atlantisscan/src/AtlantisScan.kt @@ -0,0 +1,37 @@ +package eu.kanade.tachiyomi.extension.all.atlantisscan + +import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.network.interceptor.rateLimit +import eu.kanade.tachiyomi.source.SourceFactory +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class AtlantisScanFactory : SourceFactory { + override fun createSources() = listOf( + AtlantisScanPortuguese(), + AtlantisScanSpanish(), + ) +} + +open class AtlantisScan( + baseUrl: String, + lang: String, + dateFormat: SimpleDateFormat = SimpleDateFormat("dd/MM/yyyy", Locale.US), +) : Madara("Atlantis Scan", baseUrl, lang, dateFormat) + +class AtlantisScanSpanish : AtlantisScan("https://atlantisscan.com", "es") { + + // Name was not capitalized. + override val id: Long = 2237642340381856331 + + override val useNewChapterEndpoint = true +} + +class AtlantisScanPortuguese : AtlantisScan("https://br.atlantisscan.com", "pt-BR") { + + override val client: OkHttpClient = super.client.newBuilder() + .rateLimit(1, 2, TimeUnit.SECONDS) + .build() +} diff --git a/multisrc/overrides/madara/atlantisscan/src/Atlantisscan.kt b/multisrc/overrides/madara/atlantisscan/src/Atlantisscan.kt deleted file mode 100644 index 489a67599..000000000 --- a/multisrc/overrides/madara/atlantisscan/src/Atlantisscan.kt +++ /dev/null @@ -1,7 +0,0 @@ -package eu.kanade.tachiyomi.extension.es.atlantisscan - -import eu.kanade.tachiyomi.multisrc.madara.Madara -import java.text.SimpleDateFormat -import java.util.Locale - -class Atlantisscan : Madara("Atlantis scan", "https://atlantisscan.com", "es", dateFormat = SimpleDateFormat("dd/MM/yyyy", Locale("es"))) 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 6055090f0..b9af7b030 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 @@ -13,6 +13,7 @@ class MadaraGenerator : ThemeSourceGenerator { override val baseVersionCode: Int = 29 override val sources = listOf( + MultiLang("Atlantis Scan", "https://atlantisscan.com", listOf("es", "pt-BR"), isNsfw = true), MultiLang("Leviatan Scans", "https://leviatanscans.com", listOf("en", "es"), className = "LeviatanScansFactory", overrideVersionCode = 13), MultiLang("MangaForFree.net", "https://mangaforfree.net", listOf("en", "ko", "all"), isNsfw = true, className = "MangaForFreeFactory", pkgName = "mangaforfree", overrideVersionCode = 1), MultiLang("Manhwa18.cc", "https://manhwa18.cc", listOf("en", "ko", "all"), isNsfw = true, className = "Manhwa18CcFactory", pkgName = "manhwa18cc", overrideVersionCode = 4), @@ -45,7 +46,6 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Astral Library", "https://www.astrallibrary.net", "en", overrideVersionCode = 2), SingleLang("Astral-Manga", "https://astral-manga.fr", "fr", className = "AstralManga"), SingleLang("Atikrost", "https://atikrost.com", "tr", overrideVersionCode = 1), - SingleLang("Atlantis scan", "https://atlantisscan.com", "es"), SingleLang("AZManhwa", "https://azmanhwa.net", "en"), SingleLang("Azora", "https://azoranov.com", "ar", overrideVersionCode = 5), SingleLang("Bakaman", "https://bakaman.net", "th", overrideVersionCode = 1),