Coomer Fix "Low Resolution" Preference error (#3417)
* Fix * Change version * space * Change1
This commit is contained in:
parent
2f234f7a93
commit
73ff0e28e9
|
@ -2,4 +2,4 @@ plugins {
|
||||||
id("lib-multisrc")
|
id("lib-multisrc")
|
||||||
}
|
}
|
||||||
|
|
||||||
baseVersionCode = 11
|
baseVersionCode = 12
|
||||||
|
|
|
@ -194,12 +194,14 @@ open class Kemono(
|
||||||
|
|
||||||
override fun imageRequest(page: Page): Request {
|
override fun imageRequest(page: Page): Request {
|
||||||
val imageUrl = page.imageUrl!!
|
val imageUrl = page.imageUrl!!
|
||||||
|
|
||||||
if (!preferences.getBoolean(USE_LOW_RES_IMG, false)) return GET(imageUrl, headers)
|
if (!preferences.getBoolean(USE_LOW_RES_IMG, false)) return GET(imageUrl, headers)
|
||||||
val index = imageUrl.indexOf('/', startIndex = 8) // https://
|
|
||||||
|
val index = imageUrl.indexOf('/', 8)
|
||||||
val url = buildString {
|
val url = buildString {
|
||||||
append(imageUrl, 0, index)
|
append(imageUrl, 0, index)
|
||||||
append("/thumbnail")
|
append("/thumbnail/data")
|
||||||
append(imageUrl, index, imageUrl.length)
|
append(imageUrl.substring(index))
|
||||||
}
|
}
|
||||||
return GET(url, headers)
|
return GET(url, headers)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue