diff --git a/src/all/boommanga/AndroidManifest.xml b/src/all/boommanga/AndroidManifest.xml deleted file mode 100644 index 30deb7f79..000000000 --- a/src/all/boommanga/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/all/boommanga/build.gradle b/src/all/boommanga/build.gradle deleted file mode 100644 index e73aa79b2..000000000 --- a/src/all/boommanga/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -ext { - extName = 'BoomManga, ManManga, TwinsComics' - pkgNameSuffix = 'all.boommanga' - extClass = '.BoomMangaFactory' - extVersionCode = 3 - libVersion = '1.2' -} - -apply from: "$rootDir/common.gradle" diff --git a/src/all/boommanga/res/mipmap-hdpi/ic_launcher.png b/src/all/boommanga/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 9b3564ef3..000000000 Binary files a/src/all/boommanga/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/src/all/boommanga/res/mipmap-mdpi/ic_launcher.png b/src/all/boommanga/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 9fd137ddd..000000000 Binary files a/src/all/boommanga/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/src/all/boommanga/res/mipmap-xhdpi/ic_launcher.png b/src/all/boommanga/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 5e430f320..000000000 Binary files a/src/all/boommanga/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/src/all/boommanga/res/mipmap-xxhdpi/ic_launcher.png b/src/all/boommanga/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index f71dfbfef..000000000 Binary files a/src/all/boommanga/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/all/boommanga/res/mipmap-xxxhdpi/ic_launcher.png b/src/all/boommanga/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 05f2fff76..000000000 Binary files a/src/all/boommanga/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/all/boommanga/res/web_hi_res_512.png b/src/all/boommanga/res/web_hi_res_512.png deleted file mode 100644 index 5c5686b89..000000000 Binary files a/src/all/boommanga/res/web_hi_res_512.png and /dev/null differ diff --git a/src/all/boommanga/src/eu/kanade/tachiyomi/extension/all/boommanga/BoomManga.kt b/src/all/boommanga/src/eu/kanade/tachiyomi/extension/all/boommanga/BoomManga.kt deleted file mode 100644 index 92f1a7c64..000000000 --- a/src/all/boommanga/src/eu/kanade/tachiyomi/extension/all/boommanga/BoomManga.kt +++ /dev/null @@ -1,132 +0,0 @@ -package eu.kanade.tachiyomi.extension.all.boommanga - -import eu.kanade.tachiyomi.network.GET -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 eu.kanade.tachiyomi.util.asJsoup -import okhttp3.HttpUrl -import okhttp3.Request -import okhttp3.Response -import org.jsoup.nodes.Document -import org.jsoup.nodes.Element -import java.text.SimpleDateFormat -import java.util.Locale - -open class BoomManga( - override val name: String, - override val baseUrl: String, - override val lang: String -) : ParsedHttpSource() { - - // override val name = "BoomManga" - // override val baseUrl = "https://m.boommanga.com/" - // override val lang = "en" - override val supportsLatest = true - - override fun popularMangaRequest(page: Int) = GET("$baseUrl/category?sort=heat&page=$page", headers) - override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/category?sort=new&page=$page", headers) - override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { - val url = HttpUrl.parse("$baseUrl/search?keyword=$query&page=$page")?.newBuilder() - return GET(url.toString(), headers) - } - - override fun popularMangaSelector() = ".vertical-list > li" - override fun searchMangaSelector() = ".vertical-list2 > li" - override fun latestUpdatesSelector() = popularMangaSelector() - override fun chapterListSelector() = ".chapters > li" - - override fun popularMangaNextPageSelector() = "script:containsData(next_page_url):not(script:containsData(false))" - override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector() - override fun searchMangaNextPageSelector() = popularMangaNextPageSelector() - - override fun mangaDetailsRequest(manga: SManga) = GET(manga.url, headers) - override fun chapterListRequest(manga: SManga) = mangaDetailsRequest(manga) - override fun pageListRequest(chapter: SChapter) = GET(chapter.url, headers) - - override fun popularMangaFromElement(element: Element) = mangaFromElement(element) - override fun latestUpdatesFromElement(element: Element) = mangaFromElement(element) - private fun mangaFromElement(element: Element): SManga { - val manga = SManga.create() - - manga.url = element.select("a").attr("href") - manga.title = element.select("h4").text().trim() - manga.thumbnail_url = element.select("img").attr("src") - - return manga - } - - override fun searchMangaFromElement(element: Element): SManga { - val manga = SManga.create() - manga.url = element.select("a").first().attr("href") - manga.title = element.select("h4").text().trim() - manga.author = element.select("p").first().text().trim() - manga.thumbnail_url = element.select("img").attr("src") - return manga - } - - override fun chapterFromElement(element: Element): SChapter { - val chapter = SChapter.create() - chapter.url = element.select("a").attr("href") - chapter.chapter_number = element.select("[data-num]").attr("data-num").toFloat() - val date = element.select(".date").text() - if (date.isNotBlank()) { chapter.date_upload = parseDate(date) } - chapter.name = nameselector(element).trim() - return chapter - } - - open fun nameselector(element: Element) = element.select(".name").text() - - override fun chapterListParse(response: Response): List { - return super.chapterListParse(response).reversed() - } - - private fun parseDate(date: String): Long { - return SimpleDateFormat("yyyy-MM-dd kk:mm:ss", Locale.US).parse(date)?.time ?: 0L - } - - override fun mangaDetailsParse(document: Document): SManga { - val manga = SManga.create() - manga.author = authorget(document)?.trim() - manga.artist = authorget(document)?.trim() - manga.description = document.select(".inner-text").text().trim() - manga.thumbnail_url = thumbnailget(document) - manga.genre = genreget(document) - manga.status = statusget(document) - return manga - } - - open fun authorget(document: Document) = document.select(".comic-info").first()?.text()?.substringAfter(":")?.substringBefore("HEAT") - open fun thumbnailget(document: Document) = document.select(".cover img").attr("src") - open fun genreget(document: Document) = document.select(".comic-info p").first().text() - open fun statusget(document: Document) = SManga.UNKNOWN - - override fun pageListParse(response: Response): List { - val body = response.asJsoup() - val pages = mutableListOf() - val elements = body.select("img[data-src]") - for (i in 0 until elements.size) { - pages.add(Page(i, "", getImage(elements[i]))) - } - return pages - } - - private fun getImage(element: Element): String { - var url = - when { - element.attr("data-src").endsWith(".jpg") || element.attr("data-src").endsWith(".png") || element.attr("data-src").endsWith(".jpeg") -> element.attr("data-src") - element.attr("src").endsWith(".jpg") || element.attr("src").endsWith(".png") || element.attr("src").endsWith(".jpeg") -> element.attr("src") - else -> element.attr("data-src") - } - if (url.startsWith("//")) { - url = "https:$url" - } - return url - } - - override fun pageListParse(document: Document) = throw Exception("Not used") - override fun imageUrlRequest(page: Page) = throw Exception("Not used") - override fun imageUrlParse(document: Document) = throw Exception("Not used") -} diff --git a/src/all/boommanga/src/eu/kanade/tachiyomi/extension/all/boommanga/BoomMangaFactory.kt b/src/all/boommanga/src/eu/kanade/tachiyomi/extension/all/boommanga/BoomMangaFactory.kt deleted file mode 100644 index 3ec73df65..000000000 --- a/src/all/boommanga/src/eu/kanade/tachiyomi/extension/all/boommanga/BoomMangaFactory.kt +++ /dev/null @@ -1,81 +0,0 @@ -package eu.kanade.tachiyomi.extension.all.boommanga - -import eu.kanade.tachiyomi.source.Source -import eu.kanade.tachiyomi.source.SourceFactory -import eu.kanade.tachiyomi.source.model.SManga -import org.jsoup.nodes.Document -import org.jsoup.nodes.Element - -class BoomMangaFactory : SourceFactory { - override fun createSources(): List = listOf( - BoomMangacom(), - ManManga(), - TwinsComics(), - BoomMangazh(), - ManMangazh(), - TwinsComicszh() - ) -} - -class BoomMangacom : BoomManga("BoomManga", "https://m.boommanga.com", "en") - -class ManManga : BoomManga("ManManga", "https://m.manmanga.com", "en") { - override fun nameselector(element: Element) = element.select("a").attr("alt") - override fun authorget(document: Document) = document.select(".author").text().substringAfter(":").trim() - override fun thumbnailget(document: Document) = document.select(".bg-box .bg").attr("style").substringAfter("'").substringBefore("'") - override fun genreget(document: Document) = document.select(".tags span").joinToString(", ") { - it.text().trim() - } - - override fun statusget(document: Document) = when (document.select(".type").text().substringAfter(":").trim()) { - "Ongoing" -> SManga.ONGOING - "Completed" -> SManga.COMPLETED - else -> SManga.UNKNOWN - } -} -class TwinsComics : BoomManga("TwinsComics", "https://m.twinscomics.com", "en") { - override fun nameselector(element: Element) = element.select("a").attr("alt") - override fun authorget(document: Document) = document.select(".author").text().substringAfter(":").trim() - override fun thumbnailget(document: Document) = document.select(".bg-box .bg").attr("style").substringAfter("'").substringBefore("'") - override fun genreget(document: Document) = document.select(".tags span").joinToString(", ") { - it.text().trim() - } - - override fun statusget(document: Document) = when (document.select(".type").text().substringAfter(":").trim()) { - "Ongoing" -> SManga.ONGOING - "Completed" -> SManga.COMPLETED - else -> SManga.UNKNOWN - } -} - -class BoomMangazh : BoomManga("BoomManga", "https://m.boommanga.com/cn", "zh") - -class ManMangazh : BoomManga("ManManga", "https://m.manmanga.com/cn", "zh") { - override fun nameselector(element: Element) = element.select("a").attr("alt") - override fun authorget(document: Document) = document.select(".author").text().substringAfter(":").trim() - override fun thumbnailget(document: Document) = document.select(".bg-box .bg").attr("style").substringAfter("'").substringBefore("'") - override fun genreget(document: Document) = document.select(".tags span").joinToString(", ") { - it.text().trim() - } - - override fun statusget(document: Document) = when (document.select(".type").text().substringAfter(":").trim()) { - "连载中" -> SManga.ONGOING - // "Completed" -> SManga.COMPLETED - else -> SManga.UNKNOWN - } -} - -class TwinsComicszh : BoomManga("TwinsComics", "https://m.twinscomics.com/cn", "zh") { - override fun nameselector(element: Element) = element.select("a").attr("alt") - override fun authorget(document: Document) = document.select(".author").text().substringAfter(":").trim() - override fun thumbnailget(document: Document) = document.select(".bg-box .bg").attr("style").substringAfter("'").substringBefore("'") - override fun genreget(document: Document) = document.select(".tags span").joinToString(", ") { - it.text().trim() - } - - override fun statusget(document: Document) = when (document.select(".type").text().substringAfter(":").trim()) { - "连载中" -> SManga.ONGOING - // "Completed" -> SManga.COMPLETED - else -> SManga.UNKNOWN - } -}