Fix MyReadingManga not loading images correctly (#4212)

This commit is contained in:
superbsam 2020-08-26 04:09:32 +00:00 committed by GitHub
parent 1a86045f3b
commit 225fd3d960
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'MyReadingManga'
pkgNameSuffix = 'all.myreadingmanga'
extClass = '.MyReadingMangaFactory'
extVersionCode = 39
extVersionCode = 40
libVersion = '1.2'
containsNsfw = true
}

View File

@ -17,6 +17,7 @@ import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
import okhttp3.CacheControl
import okhttp3.Headers
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
@ -37,6 +38,9 @@ open class MyReadingManga(override val lang: String, private val siteLang: Strin
.build()!!
override val supportsLatest = true
override fun headersBuilder(): Headers.Builder = Headers.Builder()
.add("Referer", baseUrl)
// Popular - Random
override fun popularMangaRequest(page: Int): Request {
return GET("$baseUrl/search/?wpsolr_sort=sort_by_random&wpsolr_page=$page&wpsolr_fq[0]=lang_str:$siteLang", headers) // Random Manga as returned by search