From 61c80736791965bdb04e56411f45210415d800d8 Mon Sep 17 00:00:00 2001 From: Vetle Ledaal Date: Fri, 3 Jan 2025 08:41:23 +0100 Subject: [PATCH] SlimeReadTheme: remove use of incompatible API (#6919) Call requires API level 26 (current min is 21): `java.util.regex.Matcher#start` (called from kotlin. text. `MatchGroupCollection#get(String)`) --- .../tachiyomi/multisrc/slimereadtheme/SlimeReadTheme.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib-multisrc/slimereadtheme/src/eu/kanade/tachiyomi/multisrc/slimereadtheme/SlimeReadTheme.kt b/lib-multisrc/slimereadtheme/src/eu/kanade/tachiyomi/multisrc/slimereadtheme/SlimeReadTheme.kt index a42c56e98..04fc62377 100644 --- a/lib-multisrc/slimereadtheme/src/eu/kanade/tachiyomi/multisrc/slimereadtheme/SlimeReadTheme.kt +++ b/lib-multisrc/slimereadtheme/src/eu/kanade/tachiyomi/multisrc/slimereadtheme/SlimeReadTheme.kt @@ -56,8 +56,8 @@ abstract class SlimeReadTheme( if (!scriptResponse.isSuccessful) throw Exception("HTTP error ${scriptResponse.code}") val script = scriptResponse.body.string() val apiUrl = FUNCTION_REGEX.find(script)?.let { result -> - val varBlock = result.groups["script"]?.value ?: return@let null - val varUrlInfix = result.groups["infix"]?.value ?: return@let null + val varBlock = result.groupValues[1] + val varUrlInfix = result.groupValues[2] val block = """${varBlock.replace(varUrlInfix, "\"$urlInfix\"")}.toString()"""