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:
kana-shii 2024-07-15 02:23:56 -03:00 committed by Draff
parent 133cb56ef3
commit dccd4920ec
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
7 changed files with 13 additions and 1 deletions

View File

@ -3,7 +3,7 @@ ext {
extClass = '.PinkSeaUnicorn'
themePkg = 'madara'
baseUrl = 'https://psunicorn.com'
overrideVersionCode = 0
overrideVersionCode = 1
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

View File

@ -2,7 +2,10 @@ package eu.kanade.tachiyomi.extension.pt.pinkseaunicorn
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import okhttp3.Interceptor
import okhttp3.OkHttpClient
import okhttp3.Response
import java.io.IOException
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
@ -15,8 +18,17 @@ class PinkSeaUnicorn : Madara(
) {
override val client: OkHttpClient = super.client.newBuilder()
.addNetworkInterceptor(::checkPasswordProtectedIntercept)
.rateLimit(1, 2, TimeUnit.SECONDS)
.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
}