StrayFansub: update theme (#4545)

This commit is contained in:
AwkwardPeak7 2024-08-10 17:52:57 +05:00 committed by Draff
parent 39b1e20401
commit 77ac036786
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 21 additions and 4 deletions

View File

@ -1,9 +1,9 @@
ext { ext {
extName = 'Stray Fansub' extName = 'Stray Fansub'
extClass = '.StrayFansub' extClass = '.StrayFansub'
themePkg = 'mangathemesia' themePkg = 'madara'
baseUrl = 'https://strayfansub.com' baseUrl = 'https://strayfansub.com'
overrideVersionCode = 7 overrideVersionCode = 2
isNsfw = true isNsfw = true
} }

View File

@ -1,17 +1,34 @@
package eu.kanade.tachiyomi.extension.tr.strayfansub package eu.kanade.tachiyomi.extension.tr.strayfansub
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.interceptor.rateLimitHost import eu.kanade.tachiyomi.network.interceptor.rateLimitHost
import eu.kanade.tachiyomi.source.model.Page
import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.HttpUrl.Companion.toHttpUrl
import org.jsoup.nodes.Document
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.Locale import java.util.Locale
class StrayFansub : MangaThemesia( class StrayFansub : Madara(
"Stray Fansub", "Stray Fansub",
"https://strayfansub.com", "https://strayfansub.com",
"tr", "tr",
dateFormat = SimpleDateFormat("MMMM d, yyyy", Locale("tr")), dateFormat = SimpleDateFormat("MMMM d, yyyy", Locale("tr")),
) { ) {
override val useLoadMoreRequest = LoadMoreStrategy.Never
override val useNewChapterEndpoint = true
override fun pageListParse(document: Document): List<Page> {
val pageList = super.pageListParse(document)
if (
pageList.isEmpty() &&
document.select(".content-blocked, .login-required").isNotEmpty()
) {
throw Exception("Okumak için WebView üzerinden giriş yapın")
}
return pageList
}
override val client = super.client.newBuilder() override val client = super.client.newBuilder()
.rateLimitHost(baseUrl.toHttpUrl(), 3) .rateLimitHost(baseUrl.toHttpUrl(), 3)
.build() .build()