[Jinmantiantang] Fix unintended block bug and missing pixels bug (#5111)
[Jinmantiantang] Fix unintended block bug and missing pixels bug
This commit is contained in:
parent
332da1818f
commit
1300b76806
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'Jinmantiantang'
|
extName = 'Jinmantiantang'
|
||||||
pkgNameSuffix = 'zh.jinmantiantang'
|
pkgNameSuffix = 'zh.jinmantiantang'
|
||||||
extClass = '.Jinmantiantang'
|
extClass = '.Jinmantiantang'
|
||||||
extVersionCode = 8
|
extVersionCode = 9
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
containsNsfw = true
|
containsNsfw = true
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,9 +86,9 @@ class Jinmantiantang : ParsedHttpSource() {
|
||||||
py = py + remainder
|
py = py + remainder
|
||||||
}
|
}
|
||||||
// 要裁剪的区域
|
// 要裁剪的区域
|
||||||
val crop = Rect(0, y, width, (height - (copyH * x) - remainder))
|
val crop = Rect(0, y, width, y + copyH)
|
||||||
// 裁剪后应放置到新图片对象的区域
|
// 裁剪后应放置到新图片对象的区域
|
||||||
val splic = Rect(0, py, width, (py + copyH))
|
val splic = Rect(0, py, width, py + copyH)
|
||||||
|
|
||||||
canvas.drawBitmap(input, crop, splic, null)
|
canvas.drawBitmap(input, crop, splic, null)
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ class Jinmantiantang : ParsedHttpSource() {
|
||||||
|
|
||||||
// 点击量排序(人气)
|
// 点击量排序(人气)
|
||||||
override fun popularMangaRequest(page: Int): Request {
|
override fun popularMangaRequest(page: Int): Request {
|
||||||
return GET("$baseUrl/albums?o=mv&page=$page&screen=$defaultRemovedGenres", headers)
|
return GET("$baseUrl/albums?o=mv&page=$page", headers)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun popularMangaNextPageSelector(): String? = "a.prevnext"
|
override fun popularMangaNextPageSelector(): String? = "a.prevnext"
|
||||||
|
@ -114,7 +114,7 @@ class Jinmantiantang : ParsedHttpSource() {
|
||||||
|
|
||||||
// 最新排序
|
// 最新排序
|
||||||
override fun latestUpdatesRequest(page: Int): Request {
|
override fun latestUpdatesRequest(page: Int): Request {
|
||||||
return GET("$baseUrl/albums?o=mr&page=$page&screen=$defaultRemovedGenres", headers)
|
return GET("$baseUrl/albums?o=mr&page=$page", headers)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun latestUpdatesNextPageSelector(): String? = popularMangaNextPageSelector()
|
override fun latestUpdatesNextPageSelector(): String? = popularMangaNextPageSelector()
|
||||||
|
@ -143,18 +143,16 @@ class Jinmantiantang : ParsedHttpSource() {
|
||||||
} else {
|
} else {
|
||||||
params = if (params == "") "/albums?" else params
|
params = if (params == "") "/albums?" else params
|
||||||
if (query == "") {
|
if (query == "") {
|
||||||
HttpUrl.parse("$baseUrl$params&page=$page&screen=$defaultRemovedGenres")?.newBuilder()
|
HttpUrl.parse("$baseUrl$params&page=$page")?.newBuilder()
|
||||||
} else {
|
} else {
|
||||||
// 在搜索栏的关键词前添加-号来实现对筛选结果的过滤, 像 "-YAOI -扶他 -毛絨絨 -獵奇", 注意此时搜索功能不可用.
|
// 在搜索栏的关键词前添加-号来实现对筛选结果的过滤, 像 "-YAOI -扶他 -毛絨絨 -獵奇", 注意此时搜索功能不可用.
|
||||||
val removedGenres = query.split(" ").filter { it.startsWith("-") }.joinToString("+") { it.removePrefix("-") }
|
val removedGenres = query.split(" ").filter { it.startsWith("-") }.joinToString("+") { it.removePrefix("-") }
|
||||||
HttpUrl.parse("$baseUrl$params&page=$page&screen=$defaultRemovedGenres$removedGenres")?.newBuilder()
|
HttpUrl.parse("$baseUrl$params&page=$page&screen=$removedGenres")?.newBuilder()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return GET(url.toString(), headers)
|
return GET(url.toString(), headers)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 默认过滤类型, 仅针对能够自己编译应用的读者
|
|
||||||
private val defaultRemovedGenres: String = "" // like ”YAOI+扶他+毛絨絨+獵奇+“
|
|
||||||
|
|
||||||
override fun searchMangaNextPageSelector(): String? = popularMangaNextPageSelector()
|
override fun searchMangaNextPageSelector(): String? = popularMangaNextPageSelector()
|
||||||
override fun searchMangaSelector(): String = popularMangaSelector()
|
override fun searchMangaSelector(): String = popularMangaSelector()
|
||||||
|
@ -321,7 +319,7 @@ class Jinmantiantang : ParsedHttpSource() {
|
||||||
Pair("巨乳", "/search/photos?search_query=巨乳&"),
|
Pair("巨乳", "/search/photos?search_query=巨乳&"),
|
||||||
Pair("贫乳", "/search/photos?search_query=貧乳&"),
|
Pair("贫乳", "/search/photos?search_query=貧乳&"),
|
||||||
Pair("女王", "/search/photos?search_query=女王&"),
|
Pair("女王", "/search/photos?search_query=女王&"),
|
||||||
Pair("教室", "/search/photos?search_query=教師&"),
|
Pair("教师", "/search/photos?search_query=教師&"),
|
||||||
Pair("女仆", "/search/photos?search_query=女僕&"),
|
Pair("女仆", "/search/photos?search_query=女僕&"),
|
||||||
Pair("护士", "/search/photos?search_query=護士&"),
|
Pair("护士", "/search/photos?search_query=護士&"),
|
||||||
Pair("泳裝", "/search/photos?search_query=泳裝&"),
|
Pair("泳裝", "/search/photos?search_query=泳裝&"),
|
||||||
|
|
Loading…
Reference in New Issue