DMZJ: fix comment page (Brotli issue) (#145)
This commit is contained in:
parent
abc5afb00f
commit
defa788dd5
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'DMZJ'
|
extName = 'DMZJ'
|
||||||
pkgNameSuffix = 'zh.dmzj'
|
pkgNameSuffix = 'zh.dmzj'
|
||||||
extClass = '.Dmzj'
|
extClass = '.Dmzj'
|
||||||
extVersionCode = 41
|
extVersionCode = 42
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Dmzj : ConfigurableSource, HttpSource() {
|
||||||
override val lang = "zh"
|
override val lang = "zh"
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
override val name = "动漫之家"
|
override val name = "动漫之家"
|
||||||
override val baseUrl = "https://m.dmzj.com"
|
override val baseUrl = "https://m.idmzj.com"
|
||||||
|
|
||||||
private val preferences: SharedPreferences =
|
private val preferences: SharedPreferences =
|
||||||
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
||||||
|
@ -36,6 +36,13 @@ class Dmzj : ConfigurableSource, HttpSource() {
|
||||||
.addInterceptor(ImageUrlInterceptor)
|
.addInterceptor(ImageUrlInterceptor)
|
||||||
.addInterceptor(CommentsInterceptor)
|
.addInterceptor(CommentsInterceptor)
|
||||||
.rateLimit(4)
|
.rateLimit(4)
|
||||||
|
.apply {
|
||||||
|
val interceptors = interceptors()
|
||||||
|
val index = interceptors.indexOfFirst { "Brotli" in it.javaClass.simpleName }
|
||||||
|
if (index >= 0) {
|
||||||
|
interceptors.add(interceptors.removeAt(index))
|
||||||
|
}
|
||||||
|
}
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
// API v4 randomly fails
|
// API v4 randomly fails
|
||||||
|
|
Loading…
Reference in New Issue