Add a new source to Madara (closes #7329). (#7341)

This commit is contained in:
Alessandro Jean 2021-05-31 20:03:34 -03:00 committed by GitHub
parent 69ae60f68a
commit 7ceb75f0ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,53 @@
package eu.kanade.tachiyomi.extension.pt.cerisescans
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
class CeriseScans : Madara(
"Cerise Scans",
"https://cerisescans.com",
"pt-BR",
SimpleDateFormat("dd 'de' MMMMM 'de' yyyy", Locale("pt", "BR"))
) {
override val client: OkHttpClient = super.client.newBuilder()
.addInterceptor(RateLimitInterceptor(1, 1, TimeUnit.SECONDS))
.build()
override fun popularMangaSelector() = "div.page-item-detail.manga"
override val altName: String = "Nome alternativo: "
// [...document.querySelectorAll('div.genres li a')]
// .map(x => `Genre("${x.innerText.trim()}", "${x.href.replace(/.*-genre\/(.*)\//, '$1')}")`)
// .join(',\n')
override fun getGenreList(): List<Genre> = listOf(
Genre("Ação", "acao"),
Genre("Adulto", "adulto"),
Genre("Comédia", "comedia"),
Genre("Doujinshi", "doujinshi"),
Genre("Drama", "drama"),
Genre("Ecchi", "ecchi"),
Genre("Fantasia", "fantasia"),
Genre("Harem", "harem"),
Genre("Harém Reverso", "harem-reverso"),
Genre("Hentai", "hentai"),
Genre("Histórico", "historico"),
Genre("Isekai", "isekai"),
Genre("Josei", "josei"),
Genre("Magia", "magia"),
Genre("Mistério", "misterio"),
Genre("Romance", "romance"),
Genre("Shoujo", "shoujo"),
Genre("Slice of Life", "slice-of-life"),
Genre("Sobrenatural", "sobrenatural"),
Genre("Soft Yaoi", "soft-yaoi"),
Genre("Soft Yuri", "soft-yuri"),
Genre("Yaoi", "yaoi"),
Genre("Yuri", "yuri")
)
}

View File

@ -42,6 +42,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("Café com Yaoi", "http://cafecomyaoi.com.br", "pt-BR", pkgName = "cafecomyaoi", className = "CafeComYaoi", isNsfw = true),
SingleLang("CatOnHeadTranslations", "https://catonhead.com", "en", overrideVersionCode = 1),
SingleLang("CAT-translator", "https://cat-translator.com", "th", className = "CatTranslator"),
SingleLang("Cerise Scans", "https://cerisescans.com", "pt-BR"),
SingleLang("Chibi Manga", "https://www.cmreader.info", "en"),
SingleLang("Clover Manga", "https://clover-manga.com", "tr", overrideVersionCode = 1),
SingleLang("ComicKiba", "https://comickiba.com", "en"),