diff --git a/multisrc/overrides/mangathemesia/manhwafreak/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/manhwafreak/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..279f61f70 Binary files /dev/null and b/multisrc/overrides/mangathemesia/manhwafreak/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/manhwafreak/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/manhwafreak/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..719edd6f1 Binary files /dev/null and b/multisrc/overrides/mangathemesia/manhwafreak/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/manhwafreak/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/manhwafreak/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..6ea3082c9 Binary files /dev/null and b/multisrc/overrides/mangathemesia/manhwafreak/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/manhwafreak/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/manhwafreak/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..223bcd7d1 Binary files /dev/null and b/multisrc/overrides/mangathemesia/manhwafreak/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/manhwafreak/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/manhwafreak/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..6717c2e42 Binary files /dev/null and b/multisrc/overrides/mangathemesia/manhwafreak/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/manhwafreak/res/web_hi_res_512.png b/multisrc/overrides/mangathemesia/manhwafreak/res/web_hi_res_512.png new file mode 100644 index 000000000..b5f934bd5 Binary files /dev/null and b/multisrc/overrides/mangathemesia/manhwafreak/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/mangathemesia/manhwafreak/src/ManhwaFreak.kt b/multisrc/overrides/mangathemesia/manhwafreak/src/ManhwaFreak.kt new file mode 100644 index 000000000..09bf5c41b --- /dev/null +++ b/multisrc/overrides/mangathemesia/manhwafreak/src/ManhwaFreak.kt @@ -0,0 +1,59 @@ +package eu.kanade.tachiyomi.extension.en.manhwafreak + +import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia +import eu.kanade.tachiyomi.network.GET +import eu.kanade.tachiyomi.source.model.FilterList +import eu.kanade.tachiyomi.source.model.SChapter +import eu.kanade.tachiyomi.source.model.SManga +import okhttp3.Request +import org.jsoup.nodes.Element + +class ManhwaFreak : MangaThemesia("Manhwa Freak", "https://manhwafreak.com", "en") { + + // they called the theme "mangareaderfix" + + // popular + override fun popularMangaRequest(page: Int): Request = GET("$baseUrl$mangaUrlDirectory?order=views", headers) + + // latest + override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl$mangaUrlDirectory", headers) + + // search + override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = + GET("$baseUrl/page/$page/?s=$query") + + override fun searchMangaSelector() = ".listupd .lastest-serie" + + // manga details + override val seriesDetailsSelector = ".wrapper .series" + + override val seriesThumbnailSelector = ".info img" + override val seriesTitleSelector = "h1.title" + override val seriesArtistSelector = "#info div:contains(Artist) > p:last-child" + override val seriesAuthorSelector = "#info div:contains(Author) > p:last-child" + override val seriesStatusSelector = "#info div:contains(Status) > p:last-child" + override val seriesDescriptionSelector = "#summary" + override val seriesGenreSelector = "#info div:contains(Genre) > p:last-child" + + override val seriesAltNameSelector = "#info div:contains(Alternative) > p:last-child" + override val seriesTypeSelector = "#info div:contains(Type) > p:last-child" + + override fun String?.parseStatus(): Int = when { + this == null -> SManga.UNKNOWN + listOf("ongoing", "publishing", "release").any { this.contains(it, ignoreCase = true) } -> SManga.ONGOING + this.contains("completed", ignoreCase = true) -> SManga.COMPLETED + else -> SManga.UNKNOWN + } + + // chapter list + override fun chapterListSelector() = ".chapter-li a" + + override fun chapterFromElement(element: Element) = SChapter.create().apply { + val urlElements = element.select("a") + setUrlWithoutDomain(urlElements.attr("href")) + name = element.select(".chapter-info p:nth-child(1)").text().ifBlank { urlElements.first().text() } + date_upload = element.selectFirst(".chapter-info p:nth-child(2)")?.text().parseChapterDate() + } + + override fun getFilterList() = FilterList() +} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesia.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesia.kt index b2f7b5bb2..d0ab0a7e4 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesia.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesia.kt @@ -30,6 +30,7 @@ import java.text.SimpleDateFormat import java.util.Locale import java.util.concurrent.TimeUnit +// Formerly WPMangaStream & WPMangaReader -> MangaThemesia abstract class MangaThemesia( override val name: String, override val baseUrl: String, diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt index 5b7b6760d..ccf6f3335 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt @@ -4,6 +4,7 @@ import generator.ThemeSourceData.MultiLang import generator.ThemeSourceData.SingleLang import generator.ThemeSourceGenerator +// Formerly WPMangaStream & WPMangaReader -> MangaThemesia class MangaThemesiaGenerator : ThemeSourceGenerator { override val themePkg = "mangathemesia" @@ -59,6 +60,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator { SingleLang("MangKomik", "https://mangkomik.com", "id"), SingleLang("Mangás Chan", "https://mangaschan.com", "pt-BR", className = "MangasChan"), SingleLang("Manhua Raw", "https://manhuaraw.com", "en"), + SingleLang("Manhwa Freak", "https://manhwafreak.com", "en"), SingleLang("ManhwaDesu", "https://manhwadesu.me", "id", isNsfw = true, overrideVersionCode = 1), SingleLang("ManhwaIndo", "https://manhwaindo.id", "id", isNsfw = true, overrideVersionCode = 2), SingleLang("ManhwaLand.mom", "https://manhwaland.mom", "id", isNsfw = true, className = "ManhwaLandMom", overrideVersionCode = 1),