StrayFansub: Change theme (#4165)

change theme
This commit is contained in:
bapeey 2024-07-24 06:48:51 -05:00 committed by Draff
parent 7cfd7eecc9
commit a1252ffd93
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 9 additions and 20 deletions

View File

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

View File

@ -1,29 +1,18 @@
package eu.kanade.tachiyomi.extension.tr.strayfansub
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.source.model.Page
import org.jsoup.nodes.Document
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
import eu.kanade.tachiyomi.network.interceptor.rateLimitHost
import okhttp3.HttpUrl.Companion.toHttpUrl
import java.text.SimpleDateFormat
import java.util.Locale
class StrayFansub : Madara(
class StrayFansub : MangaThemesia(
"Stray Fansub",
"https://strayfansub.com",
"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()
.rateLimitHost(baseUrl.toHttpUrl(), 3)
.build()
}