From a292844219ca4316aab10a218845e0837d59d016 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 6 Sep 2019 10:22:36 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/help/storage/OldRule.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/storage/OldRule.kt b/app/src/main/java/io/legado/app/help/storage/OldRule.kt index 52d1deb0e..086c67d9f 100644 --- a/app/src/main/java/io/legado/app/help/storage/OldRule.kt +++ b/app/src/main/java/io/legado/app/help/storage/OldRule.kt @@ -94,9 +94,13 @@ object OldRule { private fun toNewUrl(oldUrl: String?): String? { if (oldUrl == null) return null - if (oldUrl.startsWith("", true)) return oldUrl - val map = HashMap() var url: String = oldUrl + if (oldUrl.startsWith("", true)) { + url = url.replace("=searchKey", "={{key}}") + .replace("=searchPage", "={{page}}") + return url + } + val map = HashMap() var mather = headerPattern.matcher(url) if (mather.find()) { val header = mather.group()