diff --git a/src/tr/hentaing/build.gradle b/src/tr/hentaing/build.gradle new file mode 100644 index 000000000..af7d87cb2 --- /dev/null +++ b/src/tr/hentaing/build.gradle @@ -0,0 +1,10 @@ +ext { + extName = 'Hentaing' + extClass = '.Hentaing' + themePkg = 'madara' + baseUrl = 'https://hentaing.org' + overrideVersionCode = 0 + isNsfw = true +} + +apply from: "$rootDir/common.gradle" diff --git a/src/tr/hentaing/res/mipmap-hdpi/ic_launcher.png b/src/tr/hentaing/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..534623a3a Binary files /dev/null and b/src/tr/hentaing/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/tr/hentaing/res/mipmap-mdpi/ic_launcher.png b/src/tr/hentaing/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..6b9975e5f Binary files /dev/null and b/src/tr/hentaing/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/tr/hentaing/res/mipmap-xhdpi/ic_launcher.png b/src/tr/hentaing/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..9bcadeebe Binary files /dev/null and b/src/tr/hentaing/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/tr/hentaing/res/mipmap-xxhdpi/ic_launcher.png b/src/tr/hentaing/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..6737256ec Binary files /dev/null and b/src/tr/hentaing/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/tr/hentaing/res/mipmap-xxxhdpi/ic_launcher.png b/src/tr/hentaing/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..30db29324 Binary files /dev/null and b/src/tr/hentaing/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/tr/hentaing/src/eu/kanade/tachiyomi/extension/tr/hentaing/Hentaing.kt b/src/tr/hentaing/src/eu/kanade/tachiyomi/extension/tr/hentaing/Hentaing.kt new file mode 100644 index 000000000..c84ead8cd --- /dev/null +++ b/src/tr/hentaing/src/eu/kanade/tachiyomi/extension/tr/hentaing/Hentaing.kt @@ -0,0 +1,32 @@ +package eu.kanade.tachiyomi.extension.tr.hentaing + +import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.source.model.Page +import org.jsoup.nodes.Document +import java.text.SimpleDateFormat +import java.util.Locale + +class Hentaing : Madara( + "Hentaing", + "https://hentaing.org", + "tr", + dateFormat = SimpleDateFormat("MMMM d, yyyy", Locale("tr")), +) { + override val useLoadMoreRequest = LoadMoreStrategy.Always + override val useNewChapterEndpoint = true + + override fun pageListParse(document: Document): List { + val pageList = super.pageListParse(document) + + if ( + pageList.isEmpty() && + document.select(".content-blocked, .login-required").isNotEmpty() + ) { + throw Exception("Okumak için WebView üzerinden giriş yapın") + } + + return pageList.filterNot { it.imageUrl?.let(patternBadImage::containsMatchIn) ?: true } + } + + private val patternBadImage = """/\.(?:webp|jpeg|tiff|.{3})$""".toRegex() +}