Coomer Fix "Low Resolution" Preference error (#3417)

* Fix

* Change version

* space

* Change1
This commit is contained in:
KenjieDec 2024-06-06 13:33:03 +07:00 committed by Draff
parent 2f234f7a93
commit 73ff0e28e9
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 6 additions and 4 deletions

View File

@ -2,4 +2,4 @@ plugins {
id("lib-multisrc") id("lib-multisrc")
} }
baseVersionCode = 11 baseVersionCode = 12

View File

@ -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)
} }