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 { ext {
extName = 'Stray Fansub' extName = 'Stray Fansub'
extClass = '.StrayFansub' extClass = '.StrayFansub'
themePkg = 'madara' themePkg = 'mangathemesia'
baseUrl = 'https://strayfansub.com' baseUrl = 'https://strayfansub.com'
overrideVersionCode = 0 overrideVersionCode = 7
isNsfw = true isNsfw = true
} }

View File

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