diff --git a/src/tr/tonizutoon/build.gradle b/src/tr/tonizutoon/build.gradle index 9b87ec409..322e8d820 100644 --- a/src/tr/tonizutoon/build.gradle +++ b/src/tr/tonizutoon/build.gradle @@ -2,8 +2,8 @@ ext { extName = 'TonizuToon' extClass = '.TonizuToon' themePkg = 'madara' - baseUrl = 'https://tonizu.com' - overrideVersionCode = 1 + baseUrl = 'https://tonizu.xyz' + overrideVersionCode = 2 isNsfw = true } diff --git a/src/tr/tonizutoon/src/eu/kanade/tachiyomi/extension/tr/tonizutoon/TonizuToon.kt b/src/tr/tonizutoon/src/eu/kanade/tachiyomi/extension/tr/tonizutoon/TonizuToon.kt index c0ab0a98d..86aca01e9 100644 --- a/src/tr/tonizutoon/src/eu/kanade/tachiyomi/extension/tr/tonizutoon/TonizuToon.kt +++ b/src/tr/tonizutoon/src/eu/kanade/tachiyomi/extension/tr/tonizutoon/TonizuToon.kt @@ -1,12 +1,15 @@ package eu.kanade.tachiyomi.extension.tr.tonizutoon import eu.kanade.tachiyomi.multisrc.madara.Madara +import okhttp3.Interceptor +import okhttp3.Response +import java.io.IOException import java.text.SimpleDateFormat import java.util.Locale class TonizuToon : Madara( "TonizuToon", - "https://tonizu.com", + "https://tonizu.xyz", "tr", dateFormat = SimpleDateFormat("dd/MM/yyyy", Locale.ROOT), ) { @@ -17,4 +20,16 @@ class TonizuToon : Madara( override val mangaDetailsSelectorAuthor = ".summary-heading:contains(Yazar) ~ .summary-content" override val mangaDetailsSelectorStatus = ".summary-heading:contains(Durumu) ~ .summary-content" + + override val client = network.cloudflareClient.newBuilder() + .addNetworkInterceptor(::loginCheckInterceptor) + .build() + + private fun loginCheckInterceptor(chain: Interceptor.Chain): Response { + val request = chain.request() + if (request.url.encodedPath == "/giris-uyari/") { + throw IOException("WebView'de oturum açarak erişin") + } + return chain.proceed(request) + } }