diff --git a/src/tr/opiatoon/build.gradle b/src/tr/opiatoon/build.gradle new file mode 100644 index 000000000..e8c50f34b --- /dev/null +++ b/src/tr/opiatoon/build.gradle @@ -0,0 +1,10 @@ +ext { + extName = 'Opiatoon' + extClass = '.Opiatoon' + themePkg = 'madara' + baseUrl = 'https://opiatoon.biz' + overrideVersionCode = 0 + isNsfw = true +} + +apply from: "$rootDir/common.gradle" diff --git a/src/tr/opiatoon/res/mipmap-hdpi/ic_launcher.png b/src/tr/opiatoon/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..ee41b3b3e Binary files /dev/null and b/src/tr/opiatoon/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/tr/opiatoon/res/mipmap-mdpi/ic_launcher.png b/src/tr/opiatoon/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..f21d2e4f3 Binary files /dev/null and b/src/tr/opiatoon/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/tr/opiatoon/res/mipmap-xhdpi/ic_launcher.png b/src/tr/opiatoon/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..1d262479d Binary files /dev/null and b/src/tr/opiatoon/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/tr/opiatoon/res/mipmap-xxhdpi/ic_launcher.png b/src/tr/opiatoon/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..75f37f574 Binary files /dev/null and b/src/tr/opiatoon/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/tr/opiatoon/res/mipmap-xxxhdpi/ic_launcher.png b/src/tr/opiatoon/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..9d6968a90 Binary files /dev/null and b/src/tr/opiatoon/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/tr/opiatoon/src/eu/kanade/tachiyomi/extension/tr/opiatoon/Opiatoon.kt b/src/tr/opiatoon/src/eu/kanade/tachiyomi/extension/tr/opiatoon/Opiatoon.kt new file mode 100644 index 000000000..c338a7716 --- /dev/null +++ b/src/tr/opiatoon/src/eu/kanade/tachiyomi/extension/tr/opiatoon/Opiatoon.kt @@ -0,0 +1,42 @@ +package eu.kanade.tachiyomi.extension.tr.opiatoon + +import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.source.model.Page +import eu.kanade.tachiyomi.source.model.SChapter +import eu.kanade.tachiyomi.source.model.SManga +import okhttp3.Response +import java.text.SimpleDateFormat +import java.util.Locale + +class Opiatoon : Madara( + "Opiatoon", + "https://opiatoon.biz", + "tr", + dateFormat = SimpleDateFormat("d MMMM", Locale("tr")), +) { + override val chapterUrlSelector = "li > a" + + override val useLoadMoreRequest = LoadMoreStrategy.Always + override val useNewChapterEndpoint = true + + override fun mangaDetailsParse(response: Response): SManga { + if (response.request.url.pathSegments.getOrNull(0) == "giris-yapmalisiniz") { + throw Exception("Okumak için WebView üzerinden giriş yapın") + } + return super.mangaDetailsParse(response) + } + + override fun chapterListParse(response: Response): List { + if (response.request.url.pathSegments.getOrNull(0) == "giris-yapmalisiniz") { + throw Exception("Okumak için WebView üzerinden giriş yapın") + } + return super.chapterListParse(response) + } + + override fun pageListParse(response: Response): List { + if (response.request.url.pathSegments.getOrNull(0) == "giris-yapmalisiniz") { + throw Exception("Okumak için WebView üzerinden giriş yapın") + } + return super.pageListParse(response) + } +}