Update INKR Browse (#3145)

This commit is contained in:
AbdullahM0hamed 2020-05-13 16:44:33 +01:00 committed by GitHub
parent b659df6fd2
commit dfb7680b19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: INKR' appName = 'Tachiyomi: INKR'
pkgNameSuffix = 'en.inkr' pkgNameSuffix = 'en.inkr'
extClass = '.INKR' extClass = '.INKR'
extVersionCode = 1 extVersionCode = 2
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -60,14 +60,18 @@ class INKR : HttpSource() {
return getMangasPageFromJsonList(list) return getMangasPageFromJsonList(list)
} }
override fun popularMangaRequest(page: Int) = GET("$apiUrl/mrs_latest") override fun popularMangaRequest(page: Int): Request {
val jsonType = MediaType.parse("application/jsonType; charset=utf-8")
override fun popularMangaParse(response: Response): MangasPage { val body = RequestBody.create(jsonType, jsonObject(
val res = response.body()!!.string() "status" to "all"
val list = getMangaListFromJson(res) ).toString())
return getMangasPageFromJsonList(sortByRank(list))
return POST("$apiUrl/mrs_filter", headers, body)
} }
override fun popularMangaParse(response: Response) = searchMangaParse(response)
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
val jsonType = MediaType.parse("application/jsonType; charset=utf-8") val jsonType = MediaType.parse("application/jsonType; charset=utf-8")