diff --git a/src/pt/brmangas/AndroidManifest.xml b/src/pt/brmangas/AndroidManifest.xml deleted file mode 100644 index 8072ee00d..000000000 --- a/src/pt/brmangas/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/pt/brmangas/build.gradle b/src/pt/brmangas/build.gradle deleted file mode 100644 index 41f6fdab5..000000000 --- a/src/pt/brmangas/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -ext { - extName = 'BR Mangás' - pkgNameSuffix = 'pt.brmangas' - extClass = '.BrMangas' - extVersionCode = 5 - isNsfw = true -} - -apply from: "$rootDir/common.gradle" diff --git a/src/pt/brmangas/res/mipmap-hdpi/ic_launcher.png b/src/pt/brmangas/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 5baddbed3..000000000 Binary files a/src/pt/brmangas/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/src/pt/brmangas/res/mipmap-mdpi/ic_launcher.png b/src/pt/brmangas/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index fc72a9f8b..000000000 Binary files a/src/pt/brmangas/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/src/pt/brmangas/res/mipmap-xhdpi/ic_launcher.png b/src/pt/brmangas/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index e9559301a..000000000 Binary files a/src/pt/brmangas/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/src/pt/brmangas/res/mipmap-xxhdpi/ic_launcher.png b/src/pt/brmangas/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d0073c77e..000000000 Binary files a/src/pt/brmangas/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/pt/brmangas/res/mipmap-xxxhdpi/ic_launcher.png b/src/pt/brmangas/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 2b14e2591..000000000 Binary files a/src/pt/brmangas/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/pt/brmangas/res/web_hi_res_512.png b/src/pt/brmangas/res/web_hi_res_512.png deleted file mode 100644 index c69ee102f..000000000 Binary files a/src/pt/brmangas/res/web_hi_res_512.png and /dev/null differ diff --git a/src/pt/brmangas/src/eu/kanade/tachiyomi/extension/pt/brmangas/BrMangas.kt b/src/pt/brmangas/src/eu/kanade/tachiyomi/extension/pt/brmangas/BrMangas.kt deleted file mode 100644 index 701f655a7..000000000 --- a/src/pt/brmangas/src/eu/kanade/tachiyomi/extension/pt/brmangas/BrMangas.kt +++ /dev/null @@ -1,146 +0,0 @@ -package eu.kanade.tachiyomi.extension.pt.brmangas - -import eu.kanade.tachiyomi.network.GET -import eu.kanade.tachiyomi.network.interceptor.rateLimit -import eu.kanade.tachiyomi.source.model.FilterList -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 okhttp3.Headers -import okhttp3.HttpUrl.Companion.toHttpUrl -import okhttp3.OkHttpClient -import okhttp3.Request -import okhttp3.Response -import org.jsoup.nodes.Document -import org.jsoup.nodes.Element -import java.util.concurrent.TimeUnit - -class BrMangas : ParsedHttpSource() { - - override val name = "BR Mangás" - - override val baseUrl = "https://www.brmangas.net" - - override val lang = "pt-BR" - - override val supportsLatest = true - - override val client: OkHttpClient = network.cloudflareClient.newBuilder() - .rateLimit(1, 2, TimeUnit.SECONDS) - .build() - - override fun headersBuilder(): Headers.Builder = Headers.Builder() - .add("Accept", ACCEPT) - .add("Accept-Language", ACCEPT_LANGUAGE) - .add("Referer", "$baseUrl/") - - override fun popularMangaRequest(page: Int): Request { - val listPath = if (page == 1) "" else "page/${page - 1}" - val newHeaders = headersBuilder() - .set("Referer", "$baseUrl/$listPath") - .build() - - val pageStr = if (page != 1) "page/$page" else "" - return GET("$baseUrl/$pageStr", newHeaders) - } - - override fun popularMangaSelector(): String = - "span.heading:contains(Todos os Mangás) ~ div.listagem.row div.item a[title]" - - override fun popularMangaFromElement(element: Element): SManga = SManga.create().apply { - val thumbnailEl = element.select("img").first()!! - - title = element.select("h2.titulo").first()!!.text() - thumbnail_url = when { - thumbnailEl.hasAttr("original-src") -> thumbnailEl.attr("original-src") - else -> thumbnailEl.attr("src") - } - setUrlWithoutDomain(element.attr("href")) - } - - override fun popularMangaNextPageSelector() = "div.navigation a.next" - - override fun latestUpdatesRequest(page: Int): Request { - val listPath = if (page == 1) "" else "category/page/${page - 1}" - val newHeaders = headersBuilder() - .set("Referer", "$baseUrl/$listPath") - .build() - - val pageStr = if (page != 1) "page/$page" else "" - return GET("$baseUrl/category/mangas/$pageStr", newHeaders) - } - - override fun latestUpdatesSelector() = popularMangaSelector() - - override fun latestUpdatesFromElement(element: Element): SManga = popularMangaFromElement(element) - - override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector() - - override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { - val url = baseUrl.toHttpUrl().newBuilder() - .addQueryParameter("s", query) - .build() - - return GET(url, headers) - } - - override fun searchMangaSelector() = "div.listagem.row div.item a[title]" - - override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element) - - override fun searchMangaNextPageSelector(): String? = null - - override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply { - val infoElement = document.select("div.serie-geral div.infoall").first()!! - - title = document.select("title").first()!!.text().substringBeforeLast(" - ") - author = infoElement.select("div.serie-infos li:contains(Autor)").firstOrNull()?.ownText() - genre = infoElement.select("a.category.tag").joinToString { it.text() } - description = document.select("div.manga_sinopse ~ p").text().trim() - thumbnail_url = infoElement.select("div.serie-capa img").first()!!.attr("src") - } - - override fun chapterListParse(response: Response): List { - return super.chapterListParse(response).reversed() - } - - override fun chapterListSelector() = "ul.capitulos li.row a" - - override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply { - name = element.text() - setUrlWithoutDomain(element.attr("href")) - } - - override fun pageListParse(document: Document): List { - return document.select("script:containsData(imageArray)").first()!! - .data() - .substringAfter("[") - .substringBefore("]") - .split(",") - .mapIndexed { i, imageUrl -> - val fixedImageUrl = imageUrl - .replace("\\\"", "") - .replace("\\/", "/") - Page(i, document.location(), fixedImageUrl) - } - } - - override fun imageUrlParse(document: Document) = "" - - override fun imageRequest(page: Page): Request { - val newHeaders = headersBuilder() - .set("Accept", ACCEPT_IMAGE) - .set("Referer", page.url) - .build() - - return GET(page.imageUrl!!, newHeaders) - } - - companion object { - private const val ACCEPT = "text/html,application/xhtml+xml,application/xml;q=0.9," + - "image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" - private const val ACCEPT_IMAGE = "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8" - 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" - } -}