TonizuToon: update domain (#3812)

This commit is contained in:
Vetle Ledaal 2024-06-30 14:46:27 +02:00 committed by GitHub
parent 4bdd86e412
commit fc13bb7cde
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 3 deletions

View File

@ -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
}

View File

@ -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)
}
}