From a66da6bd062f344387905806f507d219a54f7f4a Mon Sep 17 00:00:00 2001 From: Alessandro Jean Date: Fri, 7 May 2021 15:11:41 -0300 Subject: [PATCH] Add three new sources to Madara (#6891) * Add three new sources to Madara. * Fix typo. --- .../madara/cafecomyaoi/src/CafeComYaoi.kt | 59 ++++++++++++++++++ .../madara/gloryscans/src/GloryScans.kt | 62 +++++++++++++++++++ .../madara/yaoifanclube/src/YaoiFanClube.kt | 61 ++++++++++++++++++ .../tachiyomi/multisrc/madara/Madara.kt | 2 +- .../multisrc/madara/MadaraGenerator.kt | 3 + 5 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 multisrc/overrides/madara/cafecomyaoi/src/CafeComYaoi.kt create mode 100644 multisrc/overrides/madara/gloryscans/src/GloryScans.kt create mode 100644 multisrc/overrides/madara/yaoifanclube/src/YaoiFanClube.kt diff --git a/multisrc/overrides/madara/cafecomyaoi/src/CafeComYaoi.kt b/multisrc/overrides/madara/cafecomyaoi/src/CafeComYaoi.kt new file mode 100644 index 000000000..ec8b2be24 --- /dev/null +++ b/multisrc/overrides/madara/cafecomyaoi/src/CafeComYaoi.kt @@ -0,0 +1,59 @@ +package eu.kanade.tachiyomi.extension.pt.cafecomyaoi + +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 CafeComYaoi : Madara( + "Café com Yaoi", + "http://cafecomyaoi.com.br", + "pt-BR", + SimpleDateFormat("dd/MM/yyyy", Locale("pt", "BR")) +) { + + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 1, TimeUnit.SECONDS)) + .build() + + // [...document.querySelectorAll('input[name="genre[]"]')] + // .map(x => `Genre("${document.querySelector('label[for=' + x.id + ']').innerHTML.trim()}", "${x.value}")`) + // .join(',\n') + override fun getGenreList(): List = listOf( + Genre("Ação", "acao"), + Genre("Aventura", "aventura"), + Genre("BDSM", "bdsm"), + Genre("BL", "bl"), + Genre("Comédia", "comedia"), + Genre("Doujinshi", "doujinshi"), + Genre("Drama", "drama"), + Genre("Fantasia", "fantasia"), + Genre("Gender Bender", "gender-bender"), + Genre("Harem", "harem"), + Genre("Histórico", "historico"), + Genre("Horror", "horror"), + Genre("Máfia", "mafia"), + Genre("Mangá", "manga"), + Genre("Manhua", "manhua"), + Genre("Manhwa", "manhwa"), + Genre("Mature", "mature"), + Genre("Mistério", "misterio"), + Genre("Omegaverse", "omegaverse"), + Genre("One shot", "one-shot"), + Genre("Psicológico", "psicologico"), + Genre("Romance", "romance"), + Genre("School Life", "school-life"), + Genre("Sci-fi", "sci-fi"), + Genre("Shoujo", "shoujo"), + Genre("Slice of Life", "slice-of-life"), + Genre("Smut", "smut"), + Genre("Sobrenatural", "sobrenatural"), + Genre("Tragédia", "tragedia"), + Genre("Triângulo Amoroso", "triangulo-amoroso"), + Genre("Webcomic", "webcomic") + ) +} diff --git a/multisrc/overrides/madara/gloryscans/src/GloryScans.kt b/multisrc/overrides/madara/gloryscans/src/GloryScans.kt new file mode 100644 index 000000000..42cff0604 --- /dev/null +++ b/multisrc/overrides/madara/gloryscans/src/GloryScans.kt @@ -0,0 +1,62 @@ +package eu.kanade.tachiyomi.extension.pt.gloryscans + +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 GloryScans : Madara( + "Glory Scans", + "https://gloryscan.com", + "pt-BR", + SimpleDateFormat("MMMMM dd, yyyy", Locale("pt", "BR")) +) { + + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 1, TimeUnit.SECONDS)) + .build() + + // [...document.querySelectorAll('input[name="genre[]"]')] + // .map(x => `Genre("${document.querySelector('label[for=' + x.id + ']').innerHTML.trim()}", "${x.value}")`) + // .join(',\n') + override fun getGenreList(): List = listOf( + Genre("Ação", "acao"), + Genre("Adulto", "adulto"), + Genre("Artes Marciais", "artes-marciais"), + Genre("Aventura", "aventura"), + Genre("Comédia", "comedia"), + Genre("Drama", "drama"), + Genre("Ecchi", "ecchi"), + Genre("Esporte", "esporte"), + Genre("Fantasia", "fantasia"), + Genre("Harém", "harem"), + Genre("Hentai", "hentai"), + Genre("Horror", "horror"), + Genre("Horror", "horror-horror"), + Genre("Isekai", "isekai"), + Genre("Magia", "magia"), + Genre("Mistério", "misterio"), + Genre("Monstros", "monstros"), + Genre("Psicologico", "psicologico"), + Genre("Reencarnação", "reencarnacao"), + Genre("Romance", "romance"), + Genre("Sci-fi", "sci-fi"), + Genre("Seinen", "seinen"), + Genre("Shoujo", "shoujo"), + Genre("Shounen", "shounen"), + Genre("Slice of life", "slice-of-life"), + Genre("Sobrenatural", "sobrenatural"), + Genre("Sobrevivência", "sobrevivencia"), + Genre("superpoderes", "superpoderes"), + Genre("Suspense", "suspense"), + Genre("Tragédia", "tragedia"), + Genre("Vida Escolar", "vida-escolar"), + Genre("Vingança", "vinganca"), + Genre("Webtoon", "webtoon"), + Genre("Yuri", "yuri") + ) +} diff --git a/multisrc/overrides/madara/yaoifanclube/src/YaoiFanClube.kt b/multisrc/overrides/madara/yaoifanclube/src/YaoiFanClube.kt new file mode 100644 index 000000000..6195e2968 --- /dev/null +++ b/multisrc/overrides/madara/yaoifanclube/src/YaoiFanClube.kt @@ -0,0 +1,61 @@ +package eu.kanade.tachiyomi.extension.pt.yaoifanclube + +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 YaoiFanClube : Madara( + "Yaoi Fan Clube", + "https://yaoifanclube.com.br", + "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 val popularMangaUrlSelector = "div.post-title a:not([target])" + + // [...document.querySelectorAll('input[name="genre[]"]')] + // .map(x => `Genre("${document.querySelector('label[for=' + x.id + ']').innerHTML.trim()}", "${x.value}")`) + // .join(',\n') + override fun getGenreList(): List = listOf( + Genre("Adulto", "adulto"), + Genre("Aeronáutica", "aeronautica"), + Genre("BNHA", "bnha"), + Genre("Coletânea", "coletanea"), + Genre("Comédia", "comedia"), + Genre("Crossdress", "crossdress"), + Genre("Drama", "drama"), + Genre("Esporte", "esporte"), + Genre("Fantasia", "fantasia"), + Genre("Fetiche", "fetiche"), + Genre("Ficção", "ficcao"), + Genre("Histórico", "historico"), + Genre("KNB", "knb"), + Genre("Mistério", "misterio"), + Genre("Música", "musica"), + Genre("Omegaverse", "omegaverse"), + Genre("Paródia", "parodia"), + Genre("Patinação", "patinacao"), + Genre("Policial", "policial"), + Genre("Psicológico", "psicologico"), + Genre("Robô", "robo"), + Genre("Romance", "romance"), + Genre("Shounen-ai", "shounen-ai"), + Genre("Smut", "smut"), + Genre("Sobrenatural", "sobrenatural"), + Genre("Terror", "terror"), + Genre("Tragédia", "tragedia"), + Genre("Vida Cotidiana", "vida-cotidiana"), + Genre("Vida Escolar", "vida-escolar"), + Genre("Yaoi", "yaoi"), + Genre("Zumbi", "zumbi") + ) +} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt index 9f1dc1827..656f98d9b 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt @@ -351,7 +351,7 @@ abstract class Madara( // I don't know what's the corresponding for COMPLETED and LICENSED // There's no support for "Canceled" or "On Hold" "Completed", "Completo", "Concluído", "Concluido", "Terminé" -> SManga.COMPLETED - "OnGoing", "Продолжается", "Updating", "Em Lançamento", "Em andamento", "En cours", "Ativo" -> SManga.ONGOING + "OnGoing", "Продолжается", "Updating", "Em Lançamento", "Em andamento", "Em Andamento", "En cours", "Ativo" -> SManga.ONGOING else -> SManga.UNKNOWN } } 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 e862b5f8f..c88026d6b 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 @@ -37,6 +37,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("BestManhua", "https://bestmanhua.com", "en", overrideVersionCode = 1), SingleLang("BoysLove", "https://boyslove.me", "en"), SingleLang("Bread Factory", "https://www.breadfactory.site", "en"), + 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("Chibi Manga", "https://www.cmreader.info", "en"), @@ -63,6 +64,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Furio Scans", "https://furioscans.com", "pt-BR"), SingleLang("موقع لترجمة المانجا", "https://golden-manga.com", "ar", className = "GoldenManga"), SingleLang("GalaxyDegenScans", "https://gdegenscans.xyz/", "en"), + SingleLang("Glory Scans", "https://gloryscan.com", "pt-BR", isNsfw = true), SingleLang("Graze Scans", "https://grazescans.com/", "en", overrideVersionCode = 1), SingleLang("GuncelManga", "https://guncelmanga.com", "tr"), SingleLang("Hero Manhua", "https://heromanhua.com", "en"), @@ -249,6 +251,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("WeScans", "https://wescans.xyz", "en"), SingleLang("WoopRead", "https://woopread.com", "en"), SingleLang("WuxiaWorld", "https://wuxiaworld.site", "en"), + SingleLang("Yaoi Fan Clube", "https://yaoifanclube.com.br", "pt-BR", isNsfw = true), SingleLang("Yaoi Toshokan", "https://yaoitoshokan.net", "pt-BR", isNsfw = true, overrideVersionCode = 2), SingleLang("Yokai Jump", "https://yokaijump.fr", "fr"), SingleLang("Yuri Verso", "https://yuri.live", "pt-BR"),