Revert name changes, Remove unnecessary interceptors, and Improve decoder on MSM (#990)
Revert name changes and etcs... in MSM extension.
This commit is contained in:
parent
9339cfcfe5
commit
afad932bdd
|
@ -2,10 +2,10 @@ apply plugin: 'com.android.application'
|
|||
apply plugin: 'kotlin-android'
|
||||
|
||||
ext {
|
||||
appName = 'Tachiyomi: ManaMoa (MangaShow.Me)'
|
||||
appName = 'Tachiyomi: MangaShow.Me (ManaMoa)'
|
||||
pkgNameSuffix = 'ko.mangashowme'
|
||||
extClass = '.MangaShowMe'
|
||||
extVersionCode = 8
|
||||
extVersionCode = 9
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,9 @@ internal class ImageDecoderInterceptor : Interceptor {
|
|||
val chapter = reqUrl.queryParameter("ch")!!
|
||||
val imageUrl = url.split("?").first()
|
||||
|
||||
val response = chain.proceed(GET("$imageUrl?v=2"))
|
||||
val response = chain.proceed(GET("$imageUrl?quick"))
|
||||
if (viewCnt.toInt() < 10) return response // Pass decoder if it's not scrambled.
|
||||
|
||||
val res = response.body()!!.byteStream().use {
|
||||
decodeImageRequest(version, chapter, viewCnt, it)
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ import java.util.concurrent.TimeUnit
|
|||
* `manga_list` returns latest 'added' manga. not a chapter updates.
|
||||
**/
|
||||
class MangaShowMe : ParsedHttpSource() {
|
||||
override val name = "ManaMoa (MangaShow.Me)"
|
||||
override val name = "MangaShow.Me"
|
||||
override val baseUrl = "https://manamoa.net"
|
||||
override val lang: String = "ko"
|
||||
|
||||
|
@ -33,30 +33,6 @@ class MangaShowMe : ParsedHttpSource() {
|
|||
.connectTimeout(10, TimeUnit.SECONDS)
|
||||
.readTimeout(30, TimeUnit.SECONDS)
|
||||
.addInterceptor(ImageDecoderInterceptor())
|
||||
.addInterceptor { chain ->
|
||||
val req = chain.request()
|
||||
var res: Response? = null
|
||||
|
||||
for (_i in 0..10) {
|
||||
try {
|
||||
res = chain.proceed(req)
|
||||
} catch (e: javax.net.ssl.SSLHandshakeException) {
|
||||
if (e.message.toString().contains("Connection reset by peer")) continue
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
res ?: chain.proceed(req)
|
||||
}
|
||||
.addInterceptor { chain ->
|
||||
val response = chain.proceed(chain.request())
|
||||
if (response.code() == 503) {
|
||||
val body = response.body().toString()
|
||||
if (body.contains("console.log(\"503\")") || body.contains("console.log('503')"))
|
||||
throw Exception("Try again.\nServer returns 503 Service Unavailable.")
|
||||
}
|
||||
response
|
||||
}
|
||||
.build()!!
|
||||
|
||||
//override fun popularMangaSelector() = "div.basic-post-gallery > div > div.post-row"
|
||||
|
|
Loading…
Reference in New Issue