diff --git a/src/all/mangabox/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/default/mipmap-hdpi/ic_launcher.png similarity index 100% rename from src/all/mangabox/res/mipmap-hdpi/ic_launcher.png rename to multisrc/overrides/res/mangabox/default/mipmap-hdpi/ic_launcher.png diff --git a/src/all/mangabox/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/default/mipmap-mdpi/ic_launcher.png similarity index 100% rename from src/all/mangabox/res/mipmap-mdpi/ic_launcher.png rename to multisrc/overrides/res/mangabox/default/mipmap-mdpi/ic_launcher.png diff --git a/src/all/mangabox/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/default/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from src/all/mangabox/res/mipmap-xhdpi/ic_launcher.png rename to multisrc/overrides/res/mangabox/default/mipmap-xhdpi/ic_launcher.png diff --git a/src/all/mangabox/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/default/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from src/all/mangabox/res/mipmap-xxhdpi/ic_launcher.png rename to multisrc/overrides/res/mangabox/default/mipmap-xxhdpi/ic_launcher.png diff --git a/src/all/mangabox/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/default/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from src/all/mangabox/res/mipmap-xxxhdpi/ic_launcher.png rename to multisrc/overrides/res/mangabox/default/mipmap-xxxhdpi/ic_launcher.png diff --git a/src/all/mangabox/res/web_hi_res_512.png b/multisrc/overrides/res/mangabox/default/web_hi_res_512.png similarity index 100% rename from src/all/mangabox/res/web_hi_res_512.png rename to multisrc/overrides/res/mangabox/default/web_hi_res_512.png diff --git a/multisrc/overrides/res/mangabox/mangabat/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangabat/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..8ba197004 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangabat/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangabat/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangabat/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..ae651e692 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangabat/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangabat/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangabat/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..44339134e Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangabat/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangabat/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangabat/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..faa37b014 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangabat/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangabat/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangabat/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..502995dac Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangabat/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangabat/web_hi_res_512.png b/multisrc/overrides/res/mangabox/mangabat/web_hi_res_512.png new file mode 100644 index 000000000..58a3a6839 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangabat/web_hi_res_512.png differ diff --git a/multisrc/overrides/res/mangabox/mangairo/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangairo/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..7ab1b9070 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangairo/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangairo/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangairo/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..df8c10a58 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangairo/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangairo/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangairo/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..683d30f8b Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangairo/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangairo/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangairo/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..545a0404f Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangairo/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangairo/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangairo/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..07c031464 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangairo/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangairo/web_hi_res_512.png b/multisrc/overrides/res/mangabox/mangairo/web_hi_res_512.png new file mode 100644 index 000000000..0a27b7bc4 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangairo/web_hi_res_512.png differ diff --git a/multisrc/overrides/res/mangabox/mangakakalot/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangakakalot/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..6116aa5a9 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakakalot/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangakakalot/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangakakalot/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..f92400232 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakakalot/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangakakalot/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangakakalot/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..c6dacd27f Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakakalot/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangakakalot/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangakakalot/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..00b05b9d0 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakakalot/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangakakalot/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangakakalot/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..f315e8404 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakakalot/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangakakalot/web_hi_res_512.png b/multisrc/overrides/res/mangabox/mangakakalot/web_hi_res_512.png new file mode 100644 index 000000000..9b1eb1f25 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakakalot/web_hi_res_512.png differ diff --git a/multisrc/overrides/res/mangabox/mangakakalots/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangakakalots/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..6116aa5a9 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakakalots/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangakakalots/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangakakalots/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..f92400232 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakakalots/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangakakalots/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangakakalots/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..c6dacd27f Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakakalots/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangakakalots/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangakakalots/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..00b05b9d0 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakakalots/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangakakalots/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangakakalots/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..f315e8404 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakakalots/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangakakalots/web_hi_res_512.png b/multisrc/overrides/res/mangabox/mangakakalots/web_hi_res_512.png new file mode 100644 index 000000000..9b1eb1f25 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakakalots/web_hi_res_512.png differ diff --git a/multisrc/overrides/res/mangabox/mangakita/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangakita/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..167969ff9 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakita/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangakita/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangakita/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..bed249fc4 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakita/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangakita/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangakita/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..53a90adf5 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakita/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangakita/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangakita/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d2e30a579 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakita/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangakita/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/mangakita/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..f88e8d091 Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakita/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/mangakita/web_hi_res_512.png b/multisrc/overrides/res/mangabox/mangakita/web_hi_res_512.png new file mode 100644 index 000000000..1c24b5a8a Binary files /dev/null and b/multisrc/overrides/res/mangabox/mangakita/web_hi_res_512.png differ diff --git a/multisrc/overrides/res/mangabox/manganelo/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/manganelo/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..d6df4aaf2 Binary files /dev/null and b/multisrc/overrides/res/mangabox/manganelo/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/manganelo/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/manganelo/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..c4bd03fe4 Binary files /dev/null and b/multisrc/overrides/res/mangabox/manganelo/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/manganelo/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/manganelo/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..968a07a4c Binary files /dev/null and b/multisrc/overrides/res/mangabox/manganelo/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/manganelo/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/manganelo/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..694f61cc6 Binary files /dev/null and b/multisrc/overrides/res/mangabox/manganelo/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/manganelo/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/res/mangabox/manganelo/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..8cbf26b6b Binary files /dev/null and b/multisrc/overrides/res/mangabox/manganelo/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/res/mangabox/manganelo/web_hi_res_512.png b/multisrc/overrides/res/mangabox/manganelo/web_hi_res_512.png new file mode 100644 index 000000000..64f9a43b9 Binary files /dev/null and b/multisrc/overrides/res/mangabox/manganelo/web_hi_res_512.png differ diff --git a/multisrc/overrides/src/mangabox/mangabat/Mangabat.kt b/multisrc/overrides/src/mangabox/mangabat/Mangabat.kt new file mode 100644 index 000000000..a1c618249 --- /dev/null +++ b/multisrc/overrides/src/mangabox/mangabat/Mangabat.kt @@ -0,0 +1,17 @@ +package eu.kanade.tachiyomi.extension.en.mangabat + +import eu.kanade.tachiyomi.multisrc.mangabox.MangaBox +import eu.kanade.tachiyomi.network.GET +import okhttp3.Request +import java.text.SimpleDateFormat +import java.util.Locale + +class Mangabat : MangaBox("Mangabat", "https://mangabat.com", "en", SimpleDateFormat("MMM dd,yy", Locale.ENGLISH)) { + override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/manga-list-all/$page?type=topview", headers) + override fun popularMangaSelector() = "div.list-story-item" + override val latestUrlPath = "manga-list-all/" + override fun searchMangaSelector() = "div.list-story-item" + override fun getAdvancedGenreFilters(): List = getGenreFilters() + .drop(1) + .map { AdvGenre(it.first, it.second) } +} diff --git a/multisrc/overrides/src/mangabox/mangairo/Mangairo.kt b/multisrc/overrides/src/mangabox/mangairo/Mangairo.kt new file mode 100644 index 000000000..5f23aea59 --- /dev/null +++ b/multisrc/overrides/src/mangabox/mangairo/Mangairo.kt @@ -0,0 +1,32 @@ +package eu.kanade.tachiyomi.extension.en.mangairo + +import eu.kanade.tachiyomi.multisrc.mangabox.MangaBox +import eu.kanade.tachiyomi.network.GET +import eu.kanade.tachiyomi.source.model.FilterList +import eu.kanade.tachiyomi.source.model.SManga +import okhttp3.Request +import org.jsoup.nodes.Element +import java.text.SimpleDateFormat +import java.util.Locale + +class Mangairo : MangaBox("Mangairo", "https://m.mangairo.com", "en", SimpleDateFormat("MMM-dd-yy", Locale.ENGLISH)) { + override val popularUrlPath = "manga-list/type-topview/ctg-all/state-all/page-" + override fun popularMangaSelector() = "div.story-item" + override val latestUrlPath = "manga-list/type-latest/ctg-all/state-all/page-" + override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { + return GET("$baseUrl/$simpleQueryPath${normalizeSearchQuery(query)}?page=$page", headers) + } + + override fun searchMangaSelector() = "div.story-item" + override fun searchMangaFromElement(element: Element): SManga = mangaFromElement(element, "h2 a") + override fun searchMangaNextPageSelector() = "div.group-page a.select + a:not(.go-p-end)" + override val mangaDetailsMainSelector = "${super.mangaDetailsMainSelector}, div.story_content" + override val thumbnailSelector = "${super.thumbnailSelector}, div.story_info_left img" + override val descriptionSelector = "${super.descriptionSelector}, div#story_discription p" + override fun chapterListSelector() = "${super.chapterListSelector()}, div#chapter_list li" + override val alternateChapterDateSelector = "p" + override val pageListSelector = "${super.pageListSelector}, div.panel-read-story img" + + // will have to write a separate searchMangaRequest to get filters working for this source + override fun getFilterList() = FilterList() +} diff --git a/multisrc/overrides/src/mangabox/mangakakalot/Mangakakalot.kt b/multisrc/overrides/src/mangabox/mangakakalot/Mangakakalot.kt new file mode 100644 index 000000000..fa6693006 --- /dev/null +++ b/multisrc/overrides/src/mangabox/mangakakalot/Mangakakalot.kt @@ -0,0 +1,10 @@ +package eu.kanade.tachiyomi.extension.en.mangakakalot + +import eu.kanade.tachiyomi.multisrc.mangabox.MangaBox +import okhttp3.Headers + +class Mangakakalot : MangaBox("Mangakakalot", "https://mangakakalot.com", "en") { + override fun headersBuilder(): Headers.Builder = super.headersBuilder().set("Referer", "https://manganelo.com") // for covers + override val simpleQueryPath = "search/story/" + override fun searchMangaSelector() = "${super.searchMangaSelector()}, div.list-truyen-item-wrap" +} diff --git a/multisrc/overrides/src/mangabox/mangakakalots/Mangakakalots.kt b/multisrc/overrides/src/mangabox/mangakakalots/Mangakakalots.kt new file mode 100644 index 000000000..e8c7792b7 --- /dev/null +++ b/multisrc/overrides/src/mangabox/mangakakalots/Mangakakalots.kt @@ -0,0 +1,68 @@ +package eu.kanade.tachiyomi.extension.en.mangakakalots + +import eu.kanade.tachiyomi.multisrc.mangabox.MangaBox +import eu.kanade.tachiyomi.source.model.MangasPage +import eu.kanade.tachiyomi.util.asJsoup +import okhttp3.Response + + +class Mangakakalots : MangaBox("Mangakakalots (unoriginal)", "https://mangakakalots.com", "en") { + override fun searchMangaSelector(): String = "${super.searchMangaSelector()}, div.list-truyen-item-wrap" + override fun searchMangaParse(response: Response): MangasPage { + val document = response.asJsoup() + val mangas = document.select(searchMangaSelector()).map { mangaFromElement(it) } + val hasNextPage = !response.request().url().toString() + .contains(document.select(searchMangaNextPageSelector()).attr("href")) + + return MangasPage(mangas, hasNextPage) + } + override fun searchMangaNextPageSelector() = "div.group_page a:last-of-type" + override fun getStatusFilters(): Array> = arrayOf( + Pair("all", "ALL"), + Pair("Completed", "Completed"), + Pair("Ongoing", "Ongoing") + ) + override fun getGenreFilters(): Array> = arrayOf( + Pair("all", "ALL"), + Pair("Action", "Action"), + Pair("Adult", "Adult"), + Pair("Adventure", "Adventure"), + Pair("Comedy", "Comedy"), + Pair("Cooking", "Cooking"), + Pair("Doujinshi", "Doujinshi"), + Pair("Drama", "Drama"), + Pair("Ecchi", "Ecchi"), + Pair("Fantasy", "Fantasy"), + Pair("Gender bender", "Gender bender"), + Pair("Harem", "Harem"), + Pair("Historical", "Historical"), + Pair("Horror", "Horror"), + Pair("Isekai", "Isekai"), + Pair("Josei", "Josei"), + Pair("Manhua", "Manhua"), + Pair("Manhwa", "Manhwa"), + Pair("Martial arts", "Martial arts"), + Pair("Mature", "Mature"), + Pair("Mecha", "Mecha"), + Pair("Medical", "Medical"), + Pair("Mystery", "Mystery"), + Pair("One shot", "One shot"), + Pair("Psychological", "Psychological"), + Pair("Romance", "Romance"), + Pair("School life", "School life"), + Pair("Sci fi", "Sci fi"), + Pair("Seinen", "Seinen"), + Pair("Shoujo", "Shoujo"), + Pair("Shoujo ai", "Shoujo ai"), + Pair("Shounen", "Shounen"), + Pair("Shounen ai", "Shounen ai"), + Pair("Slice of life", "Slice of life"), + Pair("Smut", "Smut"), + Pair("Sports", "Sports"), + Pair("Supernatural", "Supernatural"), + Pair("Tragedy", "Tragedy"), + Pair("Webtoons", "Webtoons"), + Pair("Yaoi", "Yaoi"), + Pair("Yuri", "Yuri") + ) +} diff --git a/multisrc/overrides/src/mangabox/manganelo/Manganelo.kt b/multisrc/overrides/src/mangabox/manganelo/Manganelo.kt new file mode 100644 index 000000000..237b8b04d --- /dev/null +++ b/multisrc/overrides/src/mangabox/manganelo/Manganelo.kt @@ -0,0 +1,18 @@ +package eu.kanade.tachiyomi.extension.en.manganelo + +import eu.kanade.tachiyomi.multisrc.mangabox.MangaBox +import eu.kanade.tachiyomi.network.GET +import okhttp3.Request + + +class Manganelo : MangaBox("Manganelo", "https://manganelo.com", "en") { + // Nelo's date format is part of the base class + override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/genre-all/$page?type=topview", headers) + override fun popularMangaSelector() = "div.content-genres-item" + override val latestUrlPath = "genre-all/" + override val simpleQueryPath = "search/story/" + override fun searchMangaSelector() = "div.search-story-item, div.content-genres-item" + override fun getAdvancedGenreFilters(): List = getGenreFilters() + .drop(1) + .map { AdvGenre(it.first, it.second) } +} diff --git a/src/all/mangabox/src/eu/kanade/tachiyomi/extension/all/mangabox/MangaBox.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangabox/MangaBox.kt similarity index 99% rename from src/all/mangabox/src/eu/kanade/tachiyomi/extension/all/mangabox/MangaBox.kt rename to multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangabox/MangaBox.kt index 46ac82eeb..5a787e856 100644 --- a/src/all/mangabox/src/eu/kanade/tachiyomi/extension/all/mangabox/MangaBox.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangabox/MangaBox.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.extension.all.mangabox +package eu.kanade.tachiyomi.multisrc.mangabox import android.annotation.SuppressLint import eu.kanade.tachiyomi.network.GET diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangabox/MangaBoxGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangabox/MangaBoxGenerator.kt new file mode 100644 index 000000000..d2e4b6081 --- /dev/null +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangabox/MangaBoxGenerator.kt @@ -0,0 +1,29 @@ +package eu.kanade.tachiyomi.multisrc.mangabox + +import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator +import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator.Companion.ThemeSourceData.SingleLang + + +class MangaBoxGenerator : ThemeSourceGenerator { + + override val themePkg = "mangabox" + + override val themeClass = "MangaBox" + + override val baseVersionCode: Int = 1 + + override val sources = listOf( + SingleLang("Mangakakalot", "https://mangakakalot.com", "en"), + SingleLang("Manganelo", "https://manganelo.com", "en"), + SingleLang("Mangabat", "https://mangabat.com", "en"), + SingleLang("Mangakakalots (unoriginal)", "https://mangakakalots.com", "en", className = "Mangakakalots", pkgName = "mangakakalots"), + SingleLang("Mangairo", "https://m.mangairo.com", "en"), + ) + + companion object { + @JvmStatic + fun main(args: Array) { + MangaBoxGenerator().createAll() + } + } +} diff --git a/src/all/mangabox/AndroidManifest.xml b/src/all/mangabox/AndroidManifest.xml deleted file mode 100644 index 30deb7f79..000000000 --- a/src/all/mangabox/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/all/mangabox/build.gradle b/src/all/mangabox/build.gradle deleted file mode 100644 index af3f6de7d..000000000 --- a/src/all/mangabox/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -ext { - extName = 'MangaBox (Mangakakalot and others)' - pkgNameSuffix = 'all.mangabox' - extClass = '.MangaBoxFactory' - extVersionCode = 24 - libVersion = '1.2' -} - -apply from: "$rootDir/common.gradle" diff --git a/src/all/mangabox/src/eu/kanade/tachiyomi/extension/all/mangabox/MangaBoxFactory.kt b/src/all/mangabox/src/eu/kanade/tachiyomi/extension/all/mangabox/MangaBoxFactory.kt deleted file mode 100644 index 9dcfc7eb5..000000000 --- a/src/all/mangabox/src/eu/kanade/tachiyomi/extension/all/mangabox/MangaBoxFactory.kt +++ /dev/null @@ -1,134 +0,0 @@ -package eu.kanade.tachiyomi.extension.all.mangabox - -import eu.kanade.tachiyomi.network.GET -import eu.kanade.tachiyomi.source.Source -import eu.kanade.tachiyomi.source.SourceFactory -import eu.kanade.tachiyomi.source.model.FilterList -import eu.kanade.tachiyomi.source.model.MangasPage -import eu.kanade.tachiyomi.source.model.SManga -import eu.kanade.tachiyomi.util.asJsoup -import okhttp3.Headers -import okhttp3.Request -import okhttp3.Response -import org.jsoup.nodes.Element -import java.text.SimpleDateFormat -import java.util.Locale - -class MangaBoxFactory : SourceFactory { - override fun createSources(): List = listOf( - Mangakakalot(), - Manganelo(), - Mangabat(), - OtherMangakakalot(), - Mangairo() - ) -} - -class Mangakakalot : MangaBox("Mangakakalot", "https://mangakakalot.com", "en") { - override fun headersBuilder(): Headers.Builder = super.headersBuilder().set("Referer", "https://manganelo.com") // for covers - override val simpleQueryPath = "search/story/" - override fun searchMangaSelector() = "${super.searchMangaSelector()}, div.list-truyen-item-wrap" -} - -class Manganelo : MangaBox("Manganelo", "https://manganelo.com", "en") { - // Nelo's date format is part of the base class - override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/genre-all/$page?type=topview", headers) - override fun popularMangaSelector() = "div.content-genres-item" - override val latestUrlPath = "genre-all/" - override val simpleQueryPath = "search/story/" - override fun searchMangaSelector() = "div.search-story-item, div.content-genres-item" - override fun getAdvancedGenreFilters(): List = getGenreFilters() - .drop(1) - .map { AdvGenre(it.first, it.second) } -} - -class Mangabat : MangaBox("Mangabat", "https://mangabat.com", "en", SimpleDateFormat("MMM dd,yy", Locale.ENGLISH)) { - override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/manga-list-all/$page?type=topview", headers) - override fun popularMangaSelector() = "div.list-story-item" - override val latestUrlPath = "manga-list-all/" - override fun searchMangaSelector() = "div.list-story-item" - override fun getAdvancedGenreFilters(): List = getGenreFilters() - .drop(1) - .map { AdvGenre(it.first, it.second) } -} - -class OtherMangakakalot : MangaBox("Mangakakalots (unoriginal)", "https://mangakakalots.com", "en") { - override fun searchMangaSelector(): String = "${super.searchMangaSelector()}, div.list-truyen-item-wrap" - override fun searchMangaParse(response: Response): MangasPage { - val document = response.asJsoup() - val mangas = document.select(searchMangaSelector()).map { mangaFromElement(it) } - val hasNextPage = !response.request().url().toString() - .contains(document.select(searchMangaNextPageSelector()).attr("href")) - - return MangasPage(mangas, hasNextPage) - } - override fun searchMangaNextPageSelector() = "div.group_page a:last-of-type" - override fun getStatusFilters(): Array> = arrayOf( - Pair("all", "ALL"), - Pair("Completed", "Completed"), - Pair("Ongoing", "Ongoing") - ) - override fun getGenreFilters(): Array> = arrayOf( - Pair("all", "ALL"), - Pair("Action", "Action"), - Pair("Adult", "Adult"), - Pair("Adventure", "Adventure"), - Pair("Comedy", "Comedy"), - Pair("Cooking", "Cooking"), - Pair("Doujinshi", "Doujinshi"), - Pair("Drama", "Drama"), - Pair("Ecchi", "Ecchi"), - Pair("Fantasy", "Fantasy"), - Pair("Gender bender", "Gender bender"), - Pair("Harem", "Harem"), - Pair("Historical", "Historical"), - Pair("Horror", "Horror"), - Pair("Isekai", "Isekai"), - Pair("Josei", "Josei"), - Pair("Manhua", "Manhua"), - Pair("Manhwa", "Manhwa"), - Pair("Martial arts", "Martial arts"), - Pair("Mature", "Mature"), - Pair("Mecha", "Mecha"), - Pair("Medical", "Medical"), - Pair("Mystery", "Mystery"), - Pair("One shot", "One shot"), - Pair("Psychological", "Psychological"), - Pair("Romance", "Romance"), - Pair("School life", "School life"), - Pair("Sci fi", "Sci fi"), - Pair("Seinen", "Seinen"), - Pair("Shoujo", "Shoujo"), - Pair("Shoujo ai", "Shoujo ai"), - Pair("Shounen", "Shounen"), - Pair("Shounen ai", "Shounen ai"), - Pair("Slice of life", "Slice of life"), - Pair("Smut", "Smut"), - Pair("Sports", "Sports"), - Pair("Supernatural", "Supernatural"), - Pair("Tragedy", "Tragedy"), - Pair("Webtoons", "Webtoons"), - Pair("Yaoi", "Yaoi"), - Pair("Yuri", "Yuri") - ) -} - -class Mangairo : MangaBox("Mangairo", "https://m.mangairo.com", "en", SimpleDateFormat("MMM-dd-yy", Locale.ENGLISH)) { - override val popularUrlPath = "manga-list/type-topview/ctg-all/state-all/page-" - override fun popularMangaSelector() = "div.story-item" - override val latestUrlPath = "manga-list/type-latest/ctg-all/state-all/page-" - override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { - return GET("$baseUrl/$simpleQueryPath${normalizeSearchQuery(query)}?page=$page", headers) - } - override fun searchMangaSelector() = "div.story-item" - override fun searchMangaFromElement(element: Element): SManga = mangaFromElement(element, "h2 a") - override fun searchMangaNextPageSelector() = "div.group-page a.select + a:not(.go-p-end)" - override val mangaDetailsMainSelector = "${super.mangaDetailsMainSelector}, div.story_content" - override val thumbnailSelector = "${super.thumbnailSelector}, div.story_info_left img" - override val descriptionSelector = "${super.descriptionSelector}, div#story_discription p" - override fun chapterListSelector() = "${super.chapterListSelector()}, div#chapter_list li" - override val alternateChapterDateSelector = "p" - override val pageListSelector = "${super.pageListSelector}, div.panel-read-story img" - // will have to write a separate searchMangaRequest to get filters working for this source - override fun getFilterList() = FilterList() -}