From 73ff0e28e9b8f616573a1c4dccfa3215177c0518 Mon Sep 17 00:00:00 2001 From: KenjieDec <65448230+KenjieDec@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:33:03 +0700 Subject: [PATCH] Coomer Fix "Low Resolution" Preference error (#3417) * Fix * Change version * space * Change1 --- lib-multisrc/kemono/build.gradle.kts | 2 +- .../src/eu/kanade/tachiyomi/multisrc/kemono/Kemono.kt | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib-multisrc/kemono/build.gradle.kts b/lib-multisrc/kemono/build.gradle.kts index 7813c7ee1..01917c6f3 100644 --- a/lib-multisrc/kemono/build.gradle.kts +++ b/lib-multisrc/kemono/build.gradle.kts @@ -2,4 +2,4 @@ plugins { id("lib-multisrc") } -baseVersionCode = 11 +baseVersionCode = 12 diff --git a/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/Kemono.kt b/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/Kemono.kt index 6f0548585..aaa1303da 100644 --- a/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/Kemono.kt +++ b/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/Kemono.kt @@ -194,12 +194,14 @@ open class Kemono( override fun imageRequest(page: Page): Request { val imageUrl = page.imageUrl!! + 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 { append(imageUrl, 0, index) - append("/thumbnail") - append(imageUrl, index, imageUrl.length) + append("/thumbnail/data") + append(imageUrl.substring(index)) } return GET(url, headers) }