Add a new source to Madara (closes #6878). (#6885)

This commit is contained in:
Alessandro Jean 2021-05-07 12:08:11 -03:00 committed by GitHub
parent be48545a67
commit a54974e45f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 54 additions and 2 deletions

View File

@ -0,0 +1,51 @@
package eu.kanade.tachiyomi.extension.pt.blmanhwaclub
import eu.kanade.tachiyomi.annotations.Nsfw
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.multisrc.madara.Madara
import okhttp3.OkHttpClient
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
@Nsfw
class BlManhwaClub : Madara(
"BL Manhwa Club",
"https://blmanhwa.club",
"pt-BR",
SimpleDateFormat("dd MMM yyyy", Locale("pt", "BR"))
) {
override val client: OkHttpClient = super.client.newBuilder()
.addInterceptor(RateLimitInterceptor(1, 1, TimeUnit.SECONDS))
.build()
// [...document.querySelectorAll('div.genres li a')]
// .map(x => `Genre("${x.innerText.slice(1, -4).replace('(', '').trim()}", "${x.href.replace(/.*genero\/(.*)\//, '$1')}")`)
// .join(',\n')
override fun getGenreList(): List<Genre> = listOf(
Genre("Ação", "acao"),
Genre("Adulto", "adulto"),
Genre("Aventura", "aventura"),
Genre("Comédia", "comedia"),
Genre("Cotidiano", "cotidiano"),
Genre("Drama", "drama"),
Genre("Esporte", "esporte"),
Genre("Fantasia", "fantasia"),
Genre("Gender Bender", "gender-bender"),
Genre("Histórico", "historico"),
Genre("Horror", "horror"),
Genre("Mafia", "mafia"),
Genre("Mistério", "misterio"),
Genre("Omegaverse", "omegaverse"),
Genre("Psicológico", "psicologico"),
Genre("Romance", "romance"),
Genre("Sci-fi", "sci-fi"),
Genre("Shounen Ai", "shounen-ai"),
Genre("Sobrenatural", "sobrenatural"),
Genre("Super Herói", "super-heroi"),
Genre("Tragédia", "tragedia"),
Genre("Vida Escolar", "vida-escolar"),
Genre("Yaoi", "yaoi")
)
}

View File

@ -350,8 +350,8 @@ abstract class Madara(
manga.status = when (it.text()) { manga.status = when (it.text()) {
// I don't know what's the corresponding for COMPLETED and LICENSED // I don't know what's the corresponding for COMPLETED and LICENSED
// There's no support for "Canceled" or "On Hold" // There's no support for "Canceled" or "On Hold"
"Completed", "Completo", "Concluído", "Terminé" -> SManga.COMPLETED "Completed", "Completo", "Concluído", "Concluido", "Terminé" -> SManga.COMPLETED
"OnGoing", "Продолжается", "Updating", "Em Lançamento", "Em andamento", "En cours" -> SManga.ONGOING "OnGoing", "Продолжается", "Updating", "Em Lançamento", "Em andamento", "En cours", "Ativo" -> SManga.ONGOING
else -> SManga.UNKNOWN else -> SManga.UNKNOWN
} }
} }

View File

@ -31,6 +31,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("ATM-Subs", "https://atm-subs.fr", "fr", className = "ATMSubs"), SingleLang("ATM-Subs", "https://atm-subs.fr", "fr", className = "ATMSubs"),
SingleLang("AYATOON", "https://ayatoon.com", "tr"), SingleLang("AYATOON", "https://ayatoon.com", "tr"),
SingleLang("Azora", "https://azoramanga.com", "ar", overrideVersionCode = 1), SingleLang("Azora", "https://azoramanga.com", "ar", overrideVersionCode = 1),
SingleLang("BL Manhwa Club", "https://blmanhwa.club", "pt-BR", isNsfw = true, className = "BlManhwaClub"),
SingleLang("Bakaman", "https://bakaman.net", "th", overrideVersionCode = 1), SingleLang("Bakaman", "https://bakaman.net", "th", overrideVersionCode = 1),
SingleLang("BestManga", "https://bestmanga.club", "ru"), SingleLang("BestManga", "https://bestmanga.club", "ru"),
SingleLang("BestManhua", "https://bestmanhua.com", "en", overrideVersionCode = 1), SingleLang("BestManhua", "https://bestmanhua.com", "en", overrideVersionCode = 1),