Manhuaren: fix browse and chapter images (#17960)
This commit is contained in:
parent
06719cffd5
commit
2cfde4e2eb
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'Manhuaren'
|
||||
pkgNameSuffix = 'zh.manhuaren'
|
||||
extClass = '.Manhuaren'
|
||||
extVersionCode = 13
|
||||
extVersionCode = 14
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.extension.zh.manhuaren
|
|||
|
||||
import android.text.format.DateFormat
|
||||
import android.util.Base64
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.source.model.Filter
|
||||
import eu.kanade.tachiyomi.source.model.FilterList
|
||||
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||
|
@ -103,7 +104,7 @@ class Manhuaren : HttpSource() {
|
|||
}
|
||||
|
||||
private fun generateLastUsedTime(): String {
|
||||
return ((Date().time / 1000).toInt() * 1000).toString()
|
||||
return ((Date().time / 1000) * 1000).toString()
|
||||
}
|
||||
|
||||
private fun encrypt(message: String): String {
|
||||
|
@ -130,30 +131,12 @@ class Manhuaren : HttpSource() {
|
|||
.uppercase()
|
||||
|
||||
val keysMap = ArrayList<HashMap<String, Any?>>().apply {
|
||||
add(
|
||||
HashMap<String, Any?>().apply {
|
||||
put("key", encrypt(imei))
|
||||
put("keyType", "0")
|
||||
},
|
||||
)
|
||||
add(
|
||||
HashMap<String, Any?>().apply {
|
||||
put("key", encrypt("mac: $mac"))
|
||||
put("keyType", "1")
|
||||
},
|
||||
)
|
||||
add(
|
||||
HashMap<String, Any?>().apply {
|
||||
put("key", encrypt(androidId)) // https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID
|
||||
put("keyType", "2")
|
||||
},
|
||||
)
|
||||
add(
|
||||
HashMap<String, Any?>().apply {
|
||||
put("key", encrypt(simSerialNumber)) // https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSerialNumber()
|
||||
put("keyType", "3")
|
||||
},
|
||||
)
|
||||
add(
|
||||
HashMap<String, Any?>().apply {
|
||||
put("key", encrypt(UUID.randomUUID().toString()))
|
||||
|
@ -531,6 +514,14 @@ class Manhuaren : HttpSource() {
|
|||
|
||||
override fun imageUrlParse(response: Response) = throw UnsupportedOperationException("This method should not be called!")
|
||||
|
||||
override fun imageRequest(page: Page): Request {
|
||||
val newHeaders = headersBuilder()
|
||||
.set("Referer", "http://www.dm5.com/dm5api/")
|
||||
.build()
|
||||
|
||||
return GET(page.imageUrl!!, newHeaders)
|
||||
}
|
||||
|
||||
override fun getFilterList() = FilterList(
|
||||
SortFilter(
|
||||
"状态",
|
||||
|
|
Loading…
Reference in New Issue