Make AA a multilang source (#16185)

Make AA a multilang source.
This commit is contained in:
Alessandro Jean 2023-04-25 14:57:37 -03:00 committed by GitHub
parent 621da80028
commit 661311c13b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 8 deletions

View File

@ -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()
}

View File

@ -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")))

View File

@ -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),