diff --git a/src/en/hentaidex/build.gradle b/src/en/hentaidex/build.gradle new file mode 100644 index 000000000..9d1e977f4 --- /dev/null +++ b/src/en/hentaidex/build.gradle @@ -0,0 +1,10 @@ +ext { + extName = 'HentaiDex' + extClass = '.HentaiDex' + themePkg = 'mangathemesia' + baseUrl = 'https://dexhentai.com' + overrideVersionCode = 0 + isNsfw = true +} + +apply from: "$rootDir/common.gradle" diff --git a/src/en/hentaidex/res/mipmap-hdpi/ic_launcher.png b/src/en/hentaidex/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..f06e6b090 Binary files /dev/null and b/src/en/hentaidex/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/en/hentaidex/res/mipmap-mdpi/ic_launcher.png b/src/en/hentaidex/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..59abdaf8a Binary files /dev/null and b/src/en/hentaidex/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/en/hentaidex/res/mipmap-xhdpi/ic_launcher.png b/src/en/hentaidex/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..474273393 Binary files /dev/null and b/src/en/hentaidex/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/en/hentaidex/res/mipmap-xxhdpi/ic_launcher.png b/src/en/hentaidex/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..e695fba88 Binary files /dev/null and b/src/en/hentaidex/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/en/hentaidex/res/mipmap-xxxhdpi/ic_launcher.png b/src/en/hentaidex/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..d2e8eaa57 Binary files /dev/null and b/src/en/hentaidex/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/en/hentaidex/src/eu/kanade/tachiyomi/extension/en/hentaidex/HentaiDex.kt b/src/en/hentaidex/src/eu/kanade/tachiyomi/extension/en/hentaidex/HentaiDex.kt new file mode 100644 index 000000000..2f75b39f8 --- /dev/null +++ b/src/en/hentaidex/src/eu/kanade/tachiyomi/extension/en/hentaidex/HentaiDex.kt @@ -0,0 +1,25 @@ +package eu.kanade.tachiyomi.extension.en.hentaidex + +import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia +import eu.kanade.tachiyomi.source.model.SChapter +import okhttp3.Response +import org.jsoup.nodes.Element +import java.text.SimpleDateFormat +import java.util.Locale + +class HentaiDex : MangaThemesia( + "HentaiDex", + "https://dexhentai.com", + "en", + dateFormat = SimpleDateFormat("MMMM d, yyyy", Locale.US), +) { + override fun chapterListParse(response: Response): List = super.chapterListParse(response).sortedByDescending { it.chapter_number } + + override fun chapterFromElement(element: Element) = SChapter.create().apply { + val urlElements = element.select("a") + setUrlWithoutDomain(urlElements.attr("href")) + name = element.select(".chapternum").text().ifBlank { urlElements.first()!!.text() } + chapter_number = element.attr("data-num").toFloat() + date_upload = element.selectFirst(".chapterdate")?.text().parseChapterDate() + } +}