Pink sea unicorn exception and icon (#3961)
* icon * pink sea unicorn exception password message * Update PinkSeaUnicorn.kt * Update PinkSeaUnicorn.kt * Update PinkSeaUnicorn.kt --------- Co-authored-by: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com>
This commit is contained in:
parent
133cb56ef3
commit
dccd4920ec
|
@ -3,7 +3,7 @@ ext {
|
||||||
extClass = '.PinkSeaUnicorn'
|
extClass = '.PinkSeaUnicorn'
|
||||||
themePkg = 'madara'
|
themePkg = 'madara'
|
||||||
baseUrl = 'https://psunicorn.com'
|
baseUrl = 'https://psunicorn.com'
|
||||||
overrideVersionCode = 0
|
overrideVersionCode = 1
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 6.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 9.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
|
@ -2,7 +2,10 @@ package eu.kanade.tachiyomi.extension.pt.pinkseaunicorn
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||||
|
import okhttp3.Interceptor
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
|
import okhttp3.Response
|
||||||
|
import java.io.IOException
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
@ -15,8 +18,17 @@ class PinkSeaUnicorn : Madara(
|
||||||
) {
|
) {
|
||||||
|
|
||||||
override val client: OkHttpClient = super.client.newBuilder()
|
override val client: OkHttpClient = super.client.newBuilder()
|
||||||
|
.addNetworkInterceptor(::checkPasswordProtectedIntercept)
|
||||||
.rateLimit(1, 2, TimeUnit.SECONDS)
|
.rateLimit(1, 2, TimeUnit.SECONDS)
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
|
private fun checkPasswordProtectedIntercept(chain: Interceptor.Chain): Response {
|
||||||
|
if (chain.request().url.queryParameter("password-protected") != null) {
|
||||||
|
throw IOException("Autentique-se através da WebView e tente novamente.")
|
||||||
|
}
|
||||||
|
|
||||||
|
return chain.proceed(chain.request())
|
||||||
|
}
|
||||||
|
|
||||||
override val useNewChapterEndpoint = true
|
override val useNewChapterEndpoint = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue