HentaiVN: Fix not showing in source list (#19500)
Fix not showing in extension list
This commit is contained in:
parent
ffec0fa53d
commit
607ac27b09
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'HentaiVN'
|
extName = 'HentaiVN'
|
||||||
pkgNameSuffix = 'vi.hentaivn'
|
pkgNameSuffix = 'vi.hentaivn'
|
||||||
extClass = '.HentaiVN'
|
extClass = '.HentaiVN'
|
||||||
extVersionCode = 30
|
extVersionCode = 31
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,20 +42,17 @@ class HentaiVN : ParsedHttpSource(), ConfigurableSource {
|
||||||
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
||||||
}
|
}
|
||||||
|
|
||||||
override val name = "HentaiVN"
|
|
||||||
|
|
||||||
private val defaultBaseUrl = "https://hentaivn.tv"
|
private val defaultBaseUrl = "https://hentaivn.tv"
|
||||||
override val baseUrl = preferences.getString(PREF_KEY_BASE_URL, defaultBaseUrl)!!
|
override val baseUrl by lazy { preferences.getString(PREF_KEY_BASE_URL, defaultBaseUrl)!! }
|
||||||
|
|
||||||
private val domain = baseUrl.toHttpUrl().host
|
|
||||||
private val searchUrl = "$baseUrl/forum/search-plus.php"
|
|
||||||
private val searchByAuthorUrl = "$baseUrl/tim-kiem-tac-gia.html"
|
|
||||||
private val searchAllURL = "$baseUrl/tim-kiem-truyen.html"
|
|
||||||
|
|
||||||
|
override val name = "HentaiVN"
|
||||||
override val lang = "vi"
|
override val lang = "vi"
|
||||||
|
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
|
|
||||||
|
private val searchUrl by lazy { "$baseUrl/forum/search-plus.php" }
|
||||||
|
private val searchByAuthorUrl by lazy { "$baseUrl/tim-kiem-tac-gia.html" }
|
||||||
|
private val searchAllURL by lazy { "$baseUrl/tim-kiem-truyen.html" }
|
||||||
|
|
||||||
override val client: OkHttpClient by lazy {
|
override val client: OkHttpClient by lazy {
|
||||||
val baseClient = if (preferences.getBoolean(PREF_KEY_ENABLE_CLOUDFLARE_BYPASS, true)) {
|
val baseClient = if (preferences.getBoolean(PREF_KEY_ENABLE_CLOUDFLARE_BYPASS, true)) {
|
||||||
network.cloudflareClient
|
network.cloudflareClient
|
||||||
|
@ -63,6 +60,7 @@ class HentaiVN : ParsedHttpSource(), ConfigurableSource {
|
||||||
network.client
|
network.client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val domain = baseUrl.toHttpUrl().host
|
||||||
baseClient.newBuilder()
|
baseClient.newBuilder()
|
||||||
.addNetworkInterceptor(CookieInterceptor(domain, "view1", "1"))
|
.addNetworkInterceptor(CookieInterceptor(domain, "view1", "1"))
|
||||||
.addNetworkInterceptor(CookieInterceptor(domain, "view4", "1"))
|
.addNetworkInterceptor(CookieInterceptor(domain, "view4", "1"))
|
||||||
|
|
Loading…
Reference in New Issue