Atlantis Scan: Move to MangaThemesia (#1205)

* Move to MangaThemesia

* Fixes
This commit is contained in:
bapeey 2024-02-12 02:22:10 -05:00 committed by GitHub
parent 2e612363bd
commit 2a9d365000
9 changed files with 23 additions and 63 deletions

View File

@ -1,62 +0,0 @@
package eu.kanade.tachiyomi.extension.es.atlantisscan
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import okhttp3.FormBody
import okhttp3.OkHttpClient
import okhttp3.Request
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
class AtlantisScan : Madara(
"Atlantis Scan",
"https://scansatlanticos.com",
"es",
dateFormat = SimpleDateFormat("dd/MM/yyyy", Locale.US),
) {
override val id: Long = 2237642340381856331
override val client: OkHttpClient = super.client.newBuilder()
.rateLimit(2, 1, TimeUnit.SECONDS)
.build()
override val useNewChapterEndpoint = true
override fun popularMangaNextPageSelector() = "body:not(:has(.no-posts))"
private fun loadMoreRequest(page: Int, metaKey: String): Request {
val formBody = FormBody.Builder().apply {
add("action", "madara_load_more")
add("page", page.toString())
add("template", "madara-core/content/content-archive")
add("vars[paged]", "1")
add("vars[orderby]", "meta_value_num")
add("vars[template]", "archive")
add("vars[sidebar]", "full")
add("vars[post_type]", "wp-manga")
add("vars[post_status]", "publish")
add("vars[meta_key]", metaKey)
add("vars[order]", "desc")
add("vars[meta_query][relation]", "AND")
add("vars[manga_archives_item_layout]", "big_thumbnail")
}.build()
val xhrHeaders = headersBuilder()
.add("Content-Length", formBody.contentLength().toString())
.add("Content-Type", formBody.contentType().toString())
.add("X-Requested-With", "XMLHttpRequest")
.build()
return POST("$baseUrl/wp-admin/admin-ajax.php", xhrHeaders, formBody)
}
override fun popularMangaRequest(page: Int): Request {
return loadMoreRequest(page - 1, "_wp_manga_views")
}
override fun latestUpdatesRequest(page: Int): Request {
return loadMoreRequest(page - 1, "_latest_update")
}
}

View File

@ -0,0 +1,22 @@
package eu.kanade.tachiyomi.extension.es.atlantisscan
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import okhttp3.OkHttpClient
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
class AtlantisScan : MangaThemesia(
"Atlantis Scan",
"https://scansatlanticos.com",
"es",
dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale.US),
) {
// Site moved from Madara to MangaThemesia
override val versionId = 2
override val client: OkHttpClient = super.client.newBuilder()
.rateLimit(2, 1, TimeUnit.SECONDS)
.build()
}

View File

@ -37,7 +37,6 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("Astral-Manga", "https://astral-manga.fr", "fr", className = "AstralManga"),
SingleLang("Astrum Scans", "https://astrumscans.xyz", "pt-BR", isNsfw = true),
SingleLang("Asura Scans.us (unoriginal)", "https://asurascans.us", "en", className = "AsuraScansUs"),
SingleLang("Atlantis Scan", "https://scansatlanticos.com", "es", isNsfw = true),
SingleLang("Azora", "https://azoramoon.com", "ar", overrideVersionCode = 7),
SingleLang("Babel Wuxia", "https://babelwuxia.com", "en", overrideVersionCode = 1),
SingleLang("Baka Manhua", "https://bakamh.com", "zh", isNsfw = true, className = "Bakamh", sourceName = "巴卡漫画"),

View File

@ -25,6 +25,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
SingleLang("Arven Scans", "https://arvenscans.com", "en"),
SingleLang("AscalonScans", "https://ascalonscans.com", "en", overrideVersionCode = 1),
SingleLang("Asura Scans", "https://asuratoon.com", "en", overrideVersionCode = 1),
SingleLang("Atlantis Scan", "https://scansatlanticos.com", "es", isNsfw = true, overrideVersionCode = 6),
SingleLang("Banana-Scan", "https://banana-scan.com", "fr", className = "BananaScan", isNsfw = true),
SingleLang("Beast Scans", "https://beastscans.net", "ar", overrideVersionCode = 1),
SingleLang("Berserker Scan", "https://ragnascan.com", "es"),