diff --git a/src/pt/supermangas/AndroidManifest.xml b/src/pt/supermangas/AndroidManifest.xml deleted file mode 100644 index 30deb7f79..000000000 --- a/src/pt/supermangas/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<manifest package="eu.kanade.tachiyomi.extension" /> diff --git a/src/pt/supermangas/build.gradle b/src/pt/supermangas/build.gradle deleted file mode 100644 index 46cec9801..000000000 --- a/src/pt/supermangas/build.gradle +++ /dev/null @@ -1,13 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -ext { - extName = 'Super Mangás' - pkgNameSuffix = 'pt.supermangas' - extClass = '.SuperMangasFactory' - extVersionCode = 7 - libVersion = '1.2' - containsNsfw = true -} - -apply from: "$rootDir/common.gradle" diff --git a/src/pt/supermangas/res/mipmap-hdpi/ic_launcher.png b/src/pt/supermangas/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index bbb3e50f8..000000000 Binary files a/src/pt/supermangas/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/src/pt/supermangas/res/mipmap-mdpi/ic_launcher.png b/src/pt/supermangas/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 99932c5af..000000000 Binary files a/src/pt/supermangas/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/src/pt/supermangas/res/mipmap-xhdpi/ic_launcher.png b/src/pt/supermangas/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 58076796d..000000000 Binary files a/src/pt/supermangas/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/src/pt/supermangas/res/mipmap-xxhdpi/ic_launcher.png b/src/pt/supermangas/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index b63ee21d7..000000000 Binary files a/src/pt/supermangas/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/pt/supermangas/res/mipmap-xxxhdpi/ic_launcher.png b/src/pt/supermangas/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index c473c2276..000000000 Binary files a/src/pt/supermangas/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/pt/supermangas/res/web_hi_res_512.png b/src/pt/supermangas/res/web_hi_res_512.png deleted file mode 100644 index e937cf17f..000000000 Binary files a/src/pt/supermangas/res/web_hi_res_512.png and /dev/null differ diff --git a/src/pt/supermangas/src/eu/kanade/tachiyomi/extension/pt/supermangas/SuperMangasFactory.kt b/src/pt/supermangas/src/eu/kanade/tachiyomi/extension/pt/supermangas/SuperMangasFactory.kt deleted file mode 100644 index 0c197e710..000000000 --- a/src/pt/supermangas/src/eu/kanade/tachiyomi/extension/pt/supermangas/SuperMangasFactory.kt +++ /dev/null @@ -1,13 +0,0 @@ -package eu.kanade.tachiyomi.extension.pt.supermangas - -import eu.kanade.tachiyomi.extension.pt.supermangas.source.SuperHentais -import eu.kanade.tachiyomi.extension.pt.supermangas.source.SuperMangas -import eu.kanade.tachiyomi.source.Source -import eu.kanade.tachiyomi.source.SourceFactory - -class SuperMangasFactory : SourceFactory { - override fun createSources(): List<Source> = listOf( - SuperMangas(), - SuperHentais() - ) -} diff --git a/src/pt/supermangas/src/eu/kanade/tachiyomi/extension/pt/supermangas/SuperMangasGeneric.kt b/src/pt/supermangas/src/eu/kanade/tachiyomi/extension/pt/supermangas/SuperMangasGeneric.kt deleted file mode 100644 index c2b6dea1b..000000000 --- a/src/pt/supermangas/src/eu/kanade/tachiyomi/extension/pt/supermangas/SuperMangasGeneric.kt +++ /dev/null @@ -1,466 +0,0 @@ -package eu.kanade.tachiyomi.extension.pt.supermangas - -import com.github.salomonbrys.kotson.array -import com.github.salomonbrys.kotson.int -import com.github.salomonbrys.kotson.jsonArray -import com.github.salomonbrys.kotson.jsonObject -import com.github.salomonbrys.kotson.obj -import com.github.salomonbrys.kotson.string -import com.google.gson.JsonObject -import com.google.gson.JsonParser -import com.squareup.duktape.Duktape -import eu.kanade.tachiyomi.network.GET -import eu.kanade.tachiyomi.network.POST -import eu.kanade.tachiyomi.source.model.Filter -import eu.kanade.tachiyomi.source.model.FilterList -import eu.kanade.tachiyomi.source.model.MangasPage -import eu.kanade.tachiyomi.source.model.Page -import eu.kanade.tachiyomi.source.model.SChapter -import eu.kanade.tachiyomi.source.model.SManga -import eu.kanade.tachiyomi.source.online.ParsedHttpSource -import eu.kanade.tachiyomi.util.asJsoup -import okhttp3.FormBody -import okhttp3.Headers -import okhttp3.HttpUrl -import okhttp3.Interceptor -import okhttp3.OkHttpClient -import okhttp3.Request -import okhttp3.RequestBody -import okhttp3.Response -import org.jsoup.Jsoup -import org.jsoup.nodes.Document -import org.jsoup.nodes.Element -import java.net.URLEncoder - -typealias Content = Triple<String, String, String> - -abstract class SuperMangasGeneric( - override val name: String, - override val baseUrl: String, - private val listPath: String = "lista" -) : ParsedHttpSource() { - - override val lang = "pt-BR" - - override val supportsLatest = true - - override val client: OkHttpClient = network.cloudflareClient.newBuilder() - .addInterceptor(::paginatorIntercept) - .build() - - override fun headersBuilder(): Headers.Builder = Headers.Builder() - .add("Accept", ACCEPT_COMMON) - .add("Accept-Language", ACCEPT_LANGUAGE) - .add("Origin", baseUrl) - .add("Referer", baseUrl) - .add("User-Agent", USER_AGENT) - - protected open val defaultFilter = mutableMapOf( - "filter_display_view" to "lista", - "filter_letter" to "0", - "filter_order" to "more_access", - "filter_type_content" to "100", - "filter_genre_model" to "yes", - "filter_status" to "0", - "filter_size_start" to "0", - "filter_size_final" to "0", - "filter_date" to "0", - "filter_date_ordem" to "0", - "filter_censure" to "0", - "filter_idade" to "", - "filter_dub" to "0", - "filter_viewed" to "0" - ) - - protected open val contentList: List<Content> = listOf() - - protected open val chapterListOrder: String = "desc" - - private fun genericPaginatedRequest( - typeUrl: String, - filterData: Map<String, String> = defaultFilter, - filterGenreAdd: List<String> = emptyList(), - filterGenreDel: List<String> = emptyList(), - page: Int = 1 - ): Request { - - val filters = jsonObject( - "filter_data" to filterData.toUrlQueryParams(), - "filter_genre_add" to jsonArray(filterGenreAdd), - "filter_genre_del" to jsonArray(filterGenreDel) - ) - - val form = FormBody.Builder() - .add("type_url", typeUrl) - .add("page", page.toString()) - .add("limit", "24") - .add("type", "lista") - .add("filters", filters.toString()) - .build() - - val newHeaders = headersBuilder() - .add("X-Requested-With", "XMLHttpRequest") - .add("Content-Type", form.contentType().toString()) - .add("Content-Length", form.contentLength().toString()) - .set("Accept", ACCEPT_JSON) - .set("Referer", "$baseUrl/$typeUrl") - .build() - - return POST("$baseUrl/inc/paginator.inc.php", newHeaders, form) - } - - private fun genericMangaFromElement(element: Element, imageAttr: String = "src"): SManga = SManga.create().apply { - title = element.select("img").first().attr("alt") - thumbnail_url = element.select("img").first().attr(imageAttr).changeSize() - setUrlWithoutDomain(element.attr("href")) - } - - private fun paginatorTokenRequest(): Request = GET("$baseUrl/$listPath", headers) - - private fun paginatorTokenParse(document: Document): String { - val script = document.select("script:containsData(ajaxSetup)").firstOrNull() - ?: return "" - - val scriptContent = script.data() - .substringAfter("eval") - .substringBefore("function checkSize") - .substringBefore("eval") - .substringBeforeLast(")") - .replace("return p}", "return p})") - - val unpacked = Duktape.create().evaluate(scriptContent) as String - - return unpacked.substringAfter("TOKEN_CSRF=\"").substringBefore("\";") - } - - override fun popularMangaRequest(page: Int): Request = genericPaginatedRequest(listPath, page = page) - - override fun popularMangaParse(response: Response): MangasPage { - val result = response.asJsonObject() - - if (result["codigo"].int == 0) - return MangasPage(emptyList(), false) - - val document = Jsoup.parse(result["body"].array.joinToString("") { it.string }) - - val mangas = document.select(popularMangaSelector()).map { element -> - popularMangaFromElement(element) - } - - val requestBody = response.request().body().bodyToString() - val totalPage = result["total_page"].string.toInt() - val page = requestBody - .substringAfter("page=") - .substringBefore("&") - .toInt() - val hasNextPage = page < totalPage - - return MangasPage(mangas, hasNextPage) - } - - override fun popularMangaSelector(): String = "article.box_view.list div.grid_box div.grid_image.grid_image_vertical a" - - override fun popularMangaFromElement(element: Element): SManga = genericMangaFromElement(element) - - override fun popularMangaNextPageSelector(): String? = null - - override fun latestUpdatesRequest(page: Int): Request { - val filterData = defaultFilter.toMutableMap() - .apply { this["filter_order"] = "date-desc" } - - return genericPaginatedRequest(listPath, filterData, page = page) - } - - override fun latestUpdatesParse(response: Response) = popularMangaParse(response) - - override fun latestUpdatesSelector() = popularMangaSelector() - - override fun latestUpdatesFromElement(element: Element) = genericMangaFromElement(element, "data-src") - - override fun latestUpdatesNextPageSelector(): String? = null - - protected open fun searchMangaWithQueryRequest(query: String): Request { - val searchUrl = HttpUrl.parse("$baseUrl/busca")!!.newBuilder() - .addEncodedQueryParameter("parametro", query) - .toString() - - return GET(searchUrl, headers) - } - - override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { - if (query.isNotEmpty()) { - return searchMangaWithQueryRequest(query) - } - - val newFilterData = defaultFilter.toMutableMap() - val filterGenreAdd = mutableListOf<String>() - val filterGenreDel = mutableListOf<String>() - - filters.forEach { filter -> - when (filter) { - is ContentFilter -> { - newFilterData["filter_type_content"] = contentList[filter.state].first - } - is LetterFilter -> { - newFilterData["filter_letter"] = - if (filter.state < 2) filter.state.toString() - else LETTER_LIST[filter.state] - } - is StatusFilter -> { - newFilterData["filter_status"] = STATUS_LIST[filter.state].first - } - is CensureFilter -> { - newFilterData["filter_censure"] = CENSURE_LIST[filter.state].first - } - is SortFilter -> { - newFilterData["filter_order"] = when { - filter.state == null -> "0" - filter.state!!.ascending -> SORT_LIST[filter.state!!.index].first - else -> SORT_LIST[filter.state!!.index].second - } - } - is ExclusiveModeFilter -> { - newFilterData["filter_genre_model"] = if (filter.state) "yes" else "no" - } - is GenreFilter -> { - filter.state.forEach { genre -> - if (genre.isExcluded()) { - filterGenreDel.add(genre.id) - } else if (genre.isIncluded()) { - filterGenreAdd.add(genre.id) - } - } - } - } - } - - return genericPaginatedRequest(listPath, newFilterData, filterGenreAdd, filterGenreDel, page = page) - } - - override fun searchMangaParse(response: Response): MangasPage { - if (response.request().url().toString().contains("busca")) - return super.searchMangaParse(response) - - return popularMangaParse(response) - } - - override fun searchMangaSelector() = "div.boxConteudo " + popularMangaSelector() - - override fun searchMangaFromElement(element: Element) = genericMangaFromElement(element, "data-src") - - override fun searchMangaNextPageSelector(): String? = null - - override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply { - val infoElement = document.select("div.boxAnime").first()!! - val infoElementAbout = infoElement.select("ul.boxAnimeSobre") - - title = document.select("div.boxBarraInfo h1").first()!!.text() - author = infoElementAbout.select("li:contains(Autor) span").first()!!.text() - artist = infoElementAbout.select("li:contains(Art:) span").first()!!.text() - genre = infoElementAbout.select("li.sizeFull span a").joinToString { it.text() } - status = infoElementAbout.select("li:contains(Conteúdo)").first()!!.text().toStatus() - description = document.select("p#sinopse").first()!!.text() - thumbnail_url = infoElement.select("span.boxAnimeImg img").first()!!.attr("src") - } - - override fun chapterListParse(response: Response): List<SChapter> { - val document = response.asJsoup() - val lastPage = document.select("select.pageSelect option").last()!! - .attr("value").toInt() - val idCategory = document.select("div#listaDeConteudo").first()!! - .attr("data-id-cat").toInt() - val mangaUrl = response.request().url().toString() - - val chapters = mutableListOf<SChapter>() - - for (page in 1..lastPage) { - val chapterListRequest = chapterListPaginatedRequest(idCategory, page, lastPage, mangaUrl) - val result = client.newCall(chapterListRequest).execute() - val apiResponse = result.asJsonObject() - - if (apiResponse["codigo"].int == 0) break - - val htmlBody = apiResponse["body"].array.joinToString("") { it.string } - chapters += Jsoup.parse(htmlBody) - .select(chapterListSelector()) - .map { chapterFromElement(it) } - } - - return chapters - } - - protected open fun chapterListPaginatedBody(idCategory: Int, page: Int, totalPage: Int): FormBody.Builder { - return FormBody.Builder() - .add("id_cat", idCategory.toString()) - .add("page", page.toString()) - .add("limit", "50") - .add("total_page", totalPage.toString()) - .add("order_video", chapterListOrder) - .add("type", "book") - } - - protected fun chapterListPaginatedRequest(idCategory: Int, page: Int, totalPage: Int, mangaUrl: String): Request { - val form = chapterListPaginatedBody(idCategory, page, totalPage).build() - - val newHeaders = headersBuilder() - .add("X-Requested-With", "XMLHttpRequest") - .add("Content-Type", form.contentType().toString()) - .add("Content-Length", form.contentLength().toString()) - .add("Host", "www." + baseUrl.substringAfter("//")) - .set("Referer", mangaUrl) - .set("Accept", ACCEPT_JSON) - .build() - - return POST("$baseUrl/inc/paginatorVideo.inc.php", newHeaders, form) - } - - override fun chapterListSelector() = "div.boxTop10 div.top10Link" - - override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply { - name = element.select("a").first()!!.text() - chapter_number = element.select("span[style]").first()!!.text().toFloatOrNull() ?: -1f - setUrlWithoutDomain(element.select("a").first()!!.attr("href")) - } - - override fun pageListParse(document: Document): List<Page> { - return document.select("div.capituloViewBox img.lazy") - .mapIndexed { i, element -> - Page(i, document.location(), element.absUrl("data-src")) - } - } - - override fun imageUrlParse(document: Document) = "" - - override fun imageRequest(page: Page): Request { - val newHeaders = headersBuilder() - .set("Referer", page.url) - .build() - - return GET(page.imageUrl!!, newHeaders) - } - - private fun paginatorIntercept(chain: Interceptor.Chain): Response { - if (!chain.request().url().toString().contains("paginator.inc")) { - return chain.proceed(chain.request()) - } - - val csrfTokenRequest = paginatorTokenRequest() - val csrfTokenResponse = chain.proceed(csrfTokenRequest) - val csrfTokenDocument = csrfTokenResponse.asJsoup() - val csrfToken = paginatorTokenParse(csrfTokenDocument) - - val totalPage = csrfTokenDocument.select("select.pageSelect option").last() - .attr("value") - - val body = chain.request().body()!! - - val newBody = "token=" + URLEncoder.encode(csrfToken, "utf-8") + - "&total_page=" + totalPage + "&" + body.bodyToString() - - val requestBody = RequestBody.create(body.contentType(), newBody) - val newRequest = chain.request().newBuilder() - .header("Content-Length", newBody.length.toString()) - .post(requestBody) - .build() - - return chain.proceed(newRequest) - } - - protected class Tag(val id: String, name: String) : Filter.TriState(name) - - protected class ContentFilter(contents: List<Content>) : Filter.Select<String>( - "Tipo de Conteúdo", - contents.map { it.third }.toTypedArray() - ) - - protected class LetterFilter : Filter.Select<String>("Letra inicial", LETTER_LIST) - - protected class StatusFilter : Filter.Select<String>( - "Status", - STATUS_LIST.map { it.second }.toTypedArray() - ) - - protected class CensureFilter : Filter.Select<String>( - "Censura", - CENSURE_LIST.map { it.second }.toTypedArray() - ) - - protected class SortFilter : Filter.Sort( - "Ordem", - SORT_LIST.map { it.third }.toTypedArray(), - Selection(2, false) - ) - - protected class GenreFilter(genres: List<Tag>) : Filter.Group<Tag>("Gêneros", genres) - protected class ExclusiveModeFilter : Filter.CheckBox("Modo Exclusivo", true) - - // [...document.querySelectorAll(".filter_genre.list-item")] - // .map(el => `Tag("${el.getAttribute('data-value')}", "${el.innerText}")`).join(',\n') - protected abstract fun getGenreList(): List<Tag> - - private fun String.changeSize(): String = substringBefore("&w=280") + "&w512" - - private fun String.toStatus() = when { - contains("Em lançamento") -> SManga.ONGOING - contains("Sendo upado") -> SManga.ONGOING - contains("Completo") -> SManga.COMPLETED - else -> SManga.UNKNOWN - } - - protected fun Response.asJsonObject(): JsonObject { - val body = body()!!.string().substringAfter("</b>") - - if (body.isEmpty()) { - throw Exception(BLOCK_MESSAGE) - } - - return JSON_PARSER.parse(body).obj - } - - private fun RequestBody?.bodyToString(): String { - if (this == null) return "" - val buffer = okio.Buffer() - writeTo(buffer) - return buffer.readUtf8() - } - - private fun Map<String, String>.toUrlQueryParams(): String = - map { (k, v) -> "$k=$v" }.joinToString("&") - - companion object { - private const val ACCEPT_COMMON = "text/html,application/xhtml+xml,application/xml;q=0.9," + - "image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" - private const val ACCEPT_JSON = "application/json, text/javascript, */*; q=0.01" - private const val ACCEPT_LANGUAGE = "pt-BR,pt;q=0.9,en-US;q=0.8,en;q=0.7,es;q=0.6,gl;q=0.5" - private const val USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " + - "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36" - private const val BLOCK_MESSAGE = "O site está bloqueando o Tachiyomi. Tente novamente mais tarde ou migre para outra fonte." - - private val JSON_PARSER by lazy { JsonParser() } - - private val LETTER_LIST = listOf("Todas", "Caracteres Especiais") - .plus(('A'..'Z').map { it.toString() }) - .toTypedArray() - - private val STATUS_LIST = listOf( - Pair("0", "Sem filtro"), - Pair("complete", "Completo"), - Pair("progress", "Em progresso"), - Pair("incomplete", "Incompleto") - ) - - private val CENSURE_LIST = listOf( - Pair("0", "Sem filtro"), - Pair("yes", "Sem censura"), - Pair("no", "Com censura") - ) - - private val SORT_LIST = listOf( - Triple("a-z", "z-a", "Nome"), - Triple("date-asc", "date-desc", "Data"), - Triple("less_access", "more_access", "Popularidade"), - Triple("less_like", "more_like", "Nº de likes"), - Triple("post-less", "post-more", "Nº de capítulos") - ) - } -} diff --git a/src/pt/supermangas/src/eu/kanade/tachiyomi/extension/pt/supermangas/source/SuperHentais.kt b/src/pt/supermangas/src/eu/kanade/tachiyomi/extension/pt/supermangas/source/SuperHentais.kt deleted file mode 100644 index c0afc7719..000000000 --- a/src/pt/supermangas/src/eu/kanade/tachiyomi/extension/pt/supermangas/source/SuperHentais.kt +++ /dev/null @@ -1,198 +0,0 @@ -package eu.kanade.tachiyomi.extension.pt.supermangas.source - -import com.github.salomonbrys.kotson.array -import com.github.salomonbrys.kotson.int -import com.github.salomonbrys.kotson.string -import eu.kanade.tachiyomi.annotations.Nsfw -import eu.kanade.tachiyomi.extension.pt.supermangas.SuperMangasGeneric -import eu.kanade.tachiyomi.network.GET -import eu.kanade.tachiyomi.source.model.Filter -import eu.kanade.tachiyomi.source.model.FilterList -import eu.kanade.tachiyomi.source.model.SChapter -import eu.kanade.tachiyomi.util.asJsoup -import okhttp3.HttpUrl -import okhttp3.Request -import okhttp3.Response -import org.jsoup.Jsoup - -@Nsfw -class SuperHentais : SuperMangasGeneric( - "Super Hentais", - "https://www.superhentais.com", - "hentai-manga" -) { - // Hardcode the id because the language wasn't specific. - override val id: Long = 6434607482102119984 - - override val defaultFilter: MutableMap<String, String> = - super.defaultFilter.apply { this["filter_type_content"] = "5" } - - override val contentList = listOf( - Triple("5", "hentai-manga", "Hentai Manga"), - Triple("6", "hq-ero", "HQ Ero"), - Triple("7", "parody-hentai-manga", "Parody Manga"), - Triple("8", "parody-hq-ero", "Parody HQ"), - Triple("9", "doujinshi", "Doujinshi"), - Triple("10", "manhwa-ero", "Manhwa") - ) - - override val chapterListOrder = "asc" - - override fun searchMangaWithQueryRequest(query: String): Request { - val searchUrl = HttpUrl.parse("$baseUrl/busca")!!.newBuilder() - .addEncodedQueryParameter("parametro", query) - .addQueryParameter("search_type", "serie") - .toString() - - return GET(searchUrl, headers) - } - - override fun searchMangaSelector(): String = "article.box_view.list div.grid_box:contains(Hentai Manga) div.grid_image.grid_image_vertical a" - - override fun chapterListParse(response: Response): List<SChapter> { - val document = response.asJsoup() - - // Parse the first chapter list page available at the html. - val chapters = document.select(chapterListSelector()) - .map { chapterFromElement(it) } - .toMutableList() - - // Check if there is more pages. - val lastPage = document.select("select.pageSelect option").last()!! - .attr("value").toInt() - - if (lastPage > 1) { - val idCategory = document.select("div#listaDeConteudo").first()!! - .attr("data-id-cat").toInt() - val mangaUrl = response.request().url().toString() - - for (page in 2..lastPage) { - val chapterListRequest = chapterListPaginatedRequest(idCategory, page, lastPage, mangaUrl) - val result = client.newCall(chapterListRequest).execute() - val apiResponse = result.asJsonObject() - - // Check if for some reason the API returned an error. - if (apiResponse["codigo"].int == 0) break - - val htmlBody = apiResponse["body"].array.joinToString("") { it.string } - chapters += Jsoup.parse(htmlBody) - .select(chapterListSelector()) - .map { chapterFromElement(it) } - } - } - - // Reverse the chapters since the pagination is broken and there is no - // way to order some parts as desc in the API and unite with the first page - // that is ordered as asc. - return chapters.reversed() - } - - override fun getFilterList() = FilterList( - Filter.Header("Filtros abaixo são ignorados na busca!"), - ContentFilter(contentList), - LetterFilter(), - StatusFilter(), - CensureFilter(), - SortFilter(), - GenreFilter(getGenreList()), - ExclusiveModeFilter() - ) - - override fun getGenreList(): List<Tag> = listOf( - Tag("33", "Ação"), - Tag("100", "Ahegao"), - Tag("64", "Anal"), - Tag("7", "Artes Marciais"), - Tag("134", "Ashikoki"), - Tag("233", "Aventura"), - Tag("57", "Bara"), - Tag("3", "BDSM"), - Tag("267", "Big Ass"), - Tag("266", "Big Cock"), - Tag("268", "Blowjob"), - Tag("88", "Boquete"), - Tag("95", "Brinquedos"), - Tag("156", "Bukkake"), - Tag("120", "Chikan"), - Tag("68", "Comédia"), - Tag("140", "Cosplay"), - Tag("265", "Creampie"), - Tag("241", "Dark Skin"), - Tag("212", "Demônio"), - Tag("169", "Drama"), - Tag("144", "Dupla Penetração"), - Tag("184", "Enfermeira"), - Tag("126", "Eroge"), - Tag("160", "Esporte"), - Tag("245", "Facial"), - Tag("30", "Fantasia"), - Tag("251", "Femdom"), - Tag("225", "Ficção Científica"), - Tag("273", "FootJob"), - Tag("270", "Forçado"), - Tag("51", "Futanari"), - Tag("106", "Gang Bang"), - Tag("240", "Gender Bender"), - Tag("67", "Gerakuro"), - Tag("254", "Gokkun"), - Tag("236", "Golden Shower"), - Tag("204", "Gore"), - Tag("234", "Grávida"), - Tag("148", "Grupo"), - Tag("2", "Gyaru"), - Tag("17", "Harém"), - Tag("8", "Histórico"), - Tag("250", "Horror"), - Tag("27", "Incesto"), - Tag("61", "Jogos Eróticos"), - Tag("5", "Josei"), - Tag("48", "Kemono"), - Tag("98", "Kemonomimi"), - Tag("252", "Lactação"), - Tag("177", "Magia"), - Tag("92", "Maid"), - Tag("110", "Masturbação"), - Tag("162", "Mecha"), - Tag("243", "Menage"), - Tag("154", "Milf"), - Tag("115", "Mind Break"), - Tag("248", "Mind Control"), - Tag("238", "Mistério"), - Tag("112", "Moe"), - Tag("200", "Monstros"), - Tag("79", "Nakadashi"), - Tag("46", "Netorare"), - Tag("272", "Óculos"), - Tag("1", "Oral"), - Tag("77", "Paizuri"), - Tag("237", "Paródia"), - Tag("59", "Peitões"), - Tag("274", "Pelos Pubianos"), - Tag("72", "Pettanko"), - Tag("36", "Policial"), - Tag("192", "Professora"), - Tag("4", "Psicológico"), - Tag("152", "Punição"), - Tag("242", "Raio-X"), - Tag("45", "Romance"), - Tag("253", "Seinen"), - Tag("271", "Sex Toys"), - Tag("93", "Sexo Público"), - Tag("55", "Shotacon"), - Tag("9", "Shoujo Ai"), - Tag("13", "Shounen ai"), - Tag("239", "Slice of Life"), - Tag("25", "Sobrenatural"), - Tag("96", "Superpoder"), - Tag("158", "Tentáculos"), - Tag("31", "Terror"), - Tag("249", "Thriller"), - Tag("217", "Vampiros"), - Tag("84", "Vanilla"), - Tag("23", "Vida Escolar"), - Tag("40", "Virgem"), - Tag("247", "Voyeur"), - Tag("6", "Yaoi"), - Tag("10", "Yuri") - ) -} diff --git a/src/pt/supermangas/src/eu/kanade/tachiyomi/extension/pt/supermangas/source/SuperMangas.kt b/src/pt/supermangas/src/eu/kanade/tachiyomi/extension/pt/supermangas/source/SuperMangas.kt deleted file mode 100644 index 6173977b9..000000000 --- a/src/pt/supermangas/src/eu/kanade/tachiyomi/extension/pt/supermangas/source/SuperMangas.kt +++ /dev/null @@ -1,140 +0,0 @@ -package eu.kanade.tachiyomi.extension.pt.supermangas.source - -import eu.kanade.tachiyomi.extension.pt.supermangas.SuperMangasGeneric -import eu.kanade.tachiyomi.network.GET -import eu.kanade.tachiyomi.source.model.Filter -import eu.kanade.tachiyomi.source.model.FilterList -import okhttp3.FormBody -import okhttp3.HttpUrl -import okhttp3.Interceptor -import okhttp3.OkHttpClient -import okhttp3.Request -import okhttp3.Response - -class SuperMangas : SuperMangasGeneric( - "Super Mangás", - "https://www.supermangas.site" -) { - override val client: OkHttpClient = super.client.newBuilder() - .addInterceptor(::tempCoverImageFixIntercept) - .build() - - override val contentList = listOf( - Triple("100", "", "Todos"), - Triple("6", "", "Mangá"), - Triple("8", "", "Light Novel"), - Triple("9", "", "Manhwa"), - Triple("10", "", "Manhua") - ) - - override fun searchMangaWithQueryRequest(query: String): Request { - val searchUrl = HttpUrl.parse("$baseUrl/busca")!!.newBuilder() - .addEncodedQueryParameter("parametro", query) - .addEncodedQueryParameter("search_type", "serie") - .toString() - - return GET(searchUrl, headers) - } - - override fun chapterListPaginatedBody(idCategory: Int, page: Int, totalPage: Int): FormBody.Builder = - super.chapterListPaginatedBody(idCategory, page, totalPage) - .add("order_audio", "pt-br") - - private fun tempCoverImageFixIntercept(chain: Interceptor.Chain): Response { - val requestUrl = chain.request().url().toString() - - if (requestUrl.contains(IMG_CDN_URL) && requestUrl.contains("?src=")) { - val newUrl = requestUrl - .replace("?src=", "") - .replaceFirst("&", "?") - - val newRequest = chain.request().newBuilder() - .url(newUrl) - .build() - - return chain.proceed(newRequest) - } - - return chain.proceed(chain.request()) - } - - override fun getFilterList() = FilterList( - Filter.Header("Os filtros abaixo são ignorados na busca!"), - ContentFilter(contentList), - LetterFilter(), - StatusFilter(), - SortFilter(), - GenreFilter(getGenreList()), - ExclusiveModeFilter() - ) - - override fun getGenreList(): List<Tag> = listOf( - Tag("1", "Ação"), - Tag("81", "Action"), - Tag("20", "Artes marciais"), - Tag("4", "Aventura"), - Tag("17", "Bishoujo"), - Tag("16", "Bishounen"), - Tag("78", "Cars"), - Tag("21", "Comédia"), - Tag("27", "Comédia romântica"), - Tag("73", "Crianças"), - Tag("79", "Dementia"), - Tag("49", "Demônio"), - Tag("76", "Doujinshi"), - Tag("22", "Drama"), - Tag("12", "Ecchi"), - Tag("47", "Espaço"), - Tag("23", "Esporte"), - Tag("24", "Fantasia"), - Tag("18", "Faroeste"), - Tag("30", "Ficção científica"), - Tag("68", "Food"), - Tag("72", "Gender Bender"), - Tag("25", "Harém"), - Tag("48", "Histórico"), - Tag("50", "Horror"), - Tag("75", "Isekai"), - Tag("34", "Jogos"), - Tag("9", "Josei"), - Tag("80", "Juventude"), - Tag("82", "Kaiju"), - Tag("83", "KBS2"), - Tag("10", "Kodomo"), - Tag("43", "Live action"), - Tag("40", "Magia"), - Tag("74", "Mature"), - Tag("11", "Mecha"), - Tag("46", "Militar"), - Tag("32", "Mistério"), - Tag("37", "Musical"), - Tag("45", "Paródia"), - Tag("38", "Policial"), - Tag("44", "Psicológico"), - Tag("3", "Romance"), - Tag("39", "Samurai"), - Tag("8", "Seinen"), - Tag("5", "Shoujo"), - Tag("7", "Shoujo-ai"), - Tag("31", "Shounen"), - Tag("6", "Shounen-ai"), - Tag("41", "Slice of life"), - Tag("28", "Sobrenatural"), - Tag("77", "Super Herói"), - Tag("35", "Superpoder"), - Tag("26", "Suspense"), - Tag("71", "Teatro"), - Tag("2", "Terror"), - Tag("33", "Thriller"), - Tag("42", "Tokusatsu"), - Tag("29", "Vampiros"), - Tag("19", "Vida escolar"), - Tag("36", "Visual Novels"), - Tag("70", "War"), - Tag("15", "Yuri") - ) - - companion object { - private const val IMG_CDN_URL = "https://img.supermangas.site" - } -}