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