From 7982c699587bfdf0a19f463ad29c724e503c8b6a Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Sat, 18 Mar 2023 11:38:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/help/source/SourceAnalyzer.kt | 13 ++++++++----- app/src/main/res/values-es-rES/strings.xml | 1 - app/src/main/res/values-ja-rJP/strings.xml | 1 - app/src/main/res/values-pt-rBR/strings.xml | 1 - app/src/main/res/values-zh-rHK/strings.xml | 1 - app/src/main/res/values-zh-rTW/strings.xml | 1 - app/src/main/res/values-zh/strings.xml | 1 - app/src/main/res/values/strings.xml | 1 - 8 files changed, 8 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/source/SourceAnalyzer.kt b/app/src/main/java/io/legado/app/help/source/SourceAnalyzer.kt index 17802511c..3f614acd0 100644 --- a/app/src/main/java/io/legado/app/help/source/SourceAnalyzer.kt +++ b/app/src/main/java/io/legado/app/help/source/SourceAnalyzer.kt @@ -52,17 +52,20 @@ object SourceAnalyzer { val documentContext = jsonPath.parse(inputStream) try { val items: List> = documentContext.read("$") - items.map { + items.forEach { val jsonItem = jsonPath.parse(it) - jsonToBookSource(jsonItem.jsonString()).getOrThrow() + jsonToBookSource(jsonItem.jsonString()).getOrThrow().let { + bookSources.add(it) + } } } catch (_: Exception) { val item: Map = documentContext.read("$") val jsonItem = jsonPath.parse(item) - mutableListOf( - jsonToBookSource(jsonItem.jsonString()).getOrThrow() - ) + jsonToBookSource(jsonItem.jsonString()).getOrThrow().let { + bookSources.add(it) + } } + bookSources }.onFailure { throw NoStackTraceException(appCtx.getString(R.string.wrong_format)) } diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml index 927902142..7c44c70bb 100644 --- a/app/src/main/res/values-es-rES/strings.xml +++ b/app/src/main/res/values-es-rES/strings.xml @@ -372,7 +372,6 @@ Simulación Desplazado Ninguno - La fuente de este libro utiliza funciones avanzadas, para desbloquear diríjase a Donaciones y toque el código de búsqueda del sobre rojo de Alipay para recibir ese sobre. Actualiza el último capítulo después del cambio de fuente en segundo plano si está habilitado, la actualización comenzará 1 minuto después de que se abra la aplicación Ocultar automáticamente la barra de herramientas diff --git a/app/src/main/res/values-ja-rJP/strings.xml b/app/src/main/res/values-ja-rJP/strings.xml index a54be5b30..6fca90a60 100644 --- a/app/src/main/res/values-ja-rJP/strings.xml +++ b/app/src/main/res/values-ja-rJP/strings.xml @@ -376,7 +376,6 @@ Simulation Scroll None - This book source uses advanced features, please go to the Donations and tap the Alipay red envelope search code to receive the red envelope,then you can use it. Update the latest chapter after changed origin in the background if enabled,the update will start 1 minute later when the software is run Auto hide ToolBar diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 1b0012e37..69bcc61bc 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -374,7 +374,6 @@ Simulação Deslizar Nenhum - Esta fonte de livro usa recursos avançados, por favor vá até Doações e toque no código de busca do envelope vermelho Alipay para receber o envelope vermelho, depois você pode usá-lo. Atualizar o último capítulo após a alteração de origem em segundo plano se ativado, a atualização será iniciada 1 minuto depois o App for aberto Auto esconder a barra de ferramentas diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index 8f31bac58..ba49aa66d 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -373,7 +373,6 @@ 仿真 滾動 無動畫 - 此書源使用了高級功能,請到捐贈裏點擊支付寶紅包搜索碼領取紅包開啟。 後台更新換源最新章節 開啟則會在軟件打開 1 分鐘後開始更新 書架 ToolBar 自動隱藏 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index c90d71c01..8a453ec29 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -375,7 +375,6 @@ 模擬 滾動 無動畫 - 此書源使用了進階功能,請到捐贈裡點擊支付寶紅包搜尋碼領取紅包開啟。 後台更新換源最新章節 開啟則會在軟體打開1分鐘後開始更新 書架ToolBar自動隱藏 diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index f7b42db3f..d8b424f59 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -375,7 +375,6 @@ 仿真 滚动 无动画 - 此书源使用了高级功能,请到捐赠里点击支付宝红包搜索码领取红包开启。 后台更新换源最新章节 开启则会在软件打开 1 分钟后开始更新 书架工具栏自动隐藏 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index aa1f00d8c..db99d95a6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -376,7 +376,6 @@ Simulation Scroll None - This book source uses advanced features, please go to the Donations and tap the Alipay red envelope search code to receive the red envelope,then you can use it. Update the latest chapter after changed origin in the background if enabled,the update will start 1 minute later when the software is run Auto hide ToolBar