diff --git a/multisrc/overrides/madara/default/additional.gradle.kts b/multisrc/overrides/madara/default/additional.gradle.kts new file mode 100644 index 000000000..10beb8157 --- /dev/null +++ b/multisrc/overrides/madara/default/additional.gradle.kts @@ -0,0 +1,4 @@ + +dependencies { + implementation project(':lib-ratelimit') +} diff --git a/multisrc/overrides/madara/yaoitoshokan/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/madara/yaoitoshokan/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..fbd7bf6f2 Binary files /dev/null and b/multisrc/overrides/madara/yaoitoshokan/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/yaoitoshokan/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/madara/yaoitoshokan/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..bb75d5e9f Binary files /dev/null and b/multisrc/overrides/madara/yaoitoshokan/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/yaoitoshokan/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/madara/yaoitoshokan/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..6336abc26 Binary files /dev/null and b/multisrc/overrides/madara/yaoitoshokan/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/yaoitoshokan/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/madara/yaoitoshokan/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..6bcfae0d9 Binary files /dev/null and b/multisrc/overrides/madara/yaoitoshokan/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/yaoitoshokan/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/madara/yaoitoshokan/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..3283cde59 Binary files /dev/null and b/multisrc/overrides/madara/yaoitoshokan/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/yaoitoshokan/res/web_hi_res_512.png b/multisrc/overrides/madara/yaoitoshokan/res/web_hi_res_512.png new file mode 100644 index 000000000..21e2fdab1 Binary files /dev/null and b/multisrc/overrides/madara/yaoitoshokan/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/madara/yaoitoshokan/src/YaoiToshokan.kt b/multisrc/overrides/madara/yaoitoshokan/src/YaoiToshokan.kt index 6a54b93d2..39b69f240 100644 --- a/multisrc/overrides/madara/yaoitoshokan/src/YaoiToshokan.kt +++ b/multisrc/overrides/madara/yaoitoshokan/src/YaoiToshokan.kt @@ -1,24 +1,30 @@ package eu.kanade.tachiyomi.extension.pt.yaoitoshokan -import eu.kanade.tachiyomi.multisrc.madara.Madara import eu.kanade.tachiyomi.annotations.Nsfw +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madara.Madara import eu.kanade.tachiyomi.source.model.Page -import eu.kanade.tachiyomi.source.model.SChapter -import okhttp3.Response +import okhttp3.OkHttpClient import org.jsoup.nodes.Document import java.text.SimpleDateFormat import java.util.Locale +import java.util.concurrent.TimeUnit @Nsfw -class YaoiToshokan : Madara("Yaoi Toshokan", "https://yaoitoshokan.com.br", "pt-BR", SimpleDateFormat("dd MMM yyyy", Locale("pt", "BR"))) { +class YaoiToshokan : Madara( + "Yaoi Toshokan", + "https://yaoitoshokan.net", + "pt-BR", + SimpleDateFormat("dd MMM yyyy", Locale("pt", "BR")) +) { + + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 1, TimeUnit.SECONDS)) + .build() + // Page has custom link to scan website. override val popularMangaUrlSelector = "div.post-title a:not([target])" - // Chapters are listed old to new. - override fun chapterListParse(response: Response): List { - return super.chapterListParse(response).reversed() - } - override fun pageListParse(document: Document): List { return document.select(pageListParseSelector) .mapIndexed { index, element -> @@ -27,4 +33,54 @@ class YaoiToshokan : Madara("Yaoi Toshokan", "https://yaoitoshokan.com.br", "pt- Page(index, document.location(), imageUrl) } } + + // [...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("Bara", "bara"), + Genre("BDSM", "bdsm"), + Genre("Comédia", "comedia"), + Genre("Comic", "comic"), + Genre("Cotidiano", "cotidiano"), + Genre("Crossdress", "gender-bender"), + Genre("Doujinshi", "doujinshi"), + Genre("Drama", "drama"), + Genre("Ecchi", "ecchi"), + Genre("Esportes", "esportes"), + Genre("Fantasia", "fantasia"), + Genre("Fury", "fury"), + Genre("Futanari", "futanari"), + Genre("Gender Bender", "gender-bender-2"), + Genre("Histórico", "historico"), + Genre("Horror", "horror"), + Genre("Incesto", "incesto"), + Genre("Mafia", "mafia"), + Genre("Manga", "manga"), + Genre("Manhua", "manhua"), + Genre("Manhwa", "manhwa"), + Genre("Mistério", "misterio"), + Genre("Mpreg", "mpreg"), + Genre("Omegaverse", "omegaverse"), + Genre("One shot", "one-shot"), + Genre("Poliamor", "poliamor"), + Genre("Psicológico", "psicologico"), + Genre("Romance", "romance"), + Genre("Salaryman", "salaryman"), + Genre("Sci-fi", "sci-fi"), + Genre("Seinen", "seinen"), + Genre("Shocaton", "shocaton"), + Genre("Shoujo", "shoujo"), + Genre("Shoujo Ai", "shoujo-ai"), + Genre("Shounen", "shounen"), + Genre("Shounen Ai", "shounen-ai"), + Genre("Smut", "smut"), + Genre("Sobrenatural", "sobrenatural"), + Genre("Tragédia", "tragedia"), + Genre("Vampiros", "vampiros"), + Genre("Vida Escolar", "vida-escolar"), + Genre("Yaoi", "yaoi") + ) } 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 1f04f3ad4..052cdc81e 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 @@ -237,7 +237,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("WeScans", "https://wescans.xyz", "en"), SingleLang("WoopRead", "https://woopread.com", "en"), SingleLang("WuxiaWorld", "https://wuxiaworld.site", "en"), - SingleLang("Yaoi Toshokan", "https://yaoitoshokan.com.br", "pt-BR", isNsfw = true, overrideVersionCode = 1), + 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"), SingleLang("Zin Translator", "https://zinmanga.com", "en"),