Xwite 3 lat temu
rodzic
commit
7982c69958

+ 8 - 5
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<Map<String, Any>> = 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<String, Any> = 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))
         }

+ 0 - 1
app/src/main/res/values-es-rES/strings.xml

@@ -372,7 +372,6 @@
     <string name="page_anim_simulation">Simulación</string>
     <string name="page_anim_scroll">Desplazado</string>
     <string name="page_anim_none">Ninguno</string>
-    <string name="donate_s">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.</string>
     <string name="up_change_source_last_chapter_t">Actualiza el último capítulo después del cambio de fuente en segundo plano</string>
     <string name="up_change_source_last_chapter_s">si está habilitado, la actualización comenzará 1 minuto después de que se abra la aplicación</string>
     <string name="behavior_main_t">Ocultar automáticamente la barra de herramientas</string>

+ 0 - 1
app/src/main/res/values-ja-rJP/strings.xml

@@ -376,7 +376,6 @@
     <string name="page_anim_simulation">Simulation</string>
     <string name="page_anim_scroll">Scroll</string>
     <string name="page_anim_none">None</string>
-    <string name="donate_s">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.</string>
     <string name="up_change_source_last_chapter_t">Update the latest chapter after changed origin in the background</string>
     <string name="up_change_source_last_chapter_s">if enabled,the update will start 1 minute later when the software is run</string>
     <string name="behavior_main_t">Auto hide ToolBar</string>

+ 0 - 1
app/src/main/res/values-pt-rBR/strings.xml

@@ -374,7 +374,6 @@
     <string name="page_anim_simulation">Simulação</string>
     <string name="page_anim_scroll">Deslizar</string>
     <string name="page_anim_none">Nenhum</string>
-    <string name="donate_s">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.</string>
     <string name="up_change_source_last_chapter_t">Atualizar o último capítulo após a alteração de origem em segundo plano</string>
     <string name="up_change_source_last_chapter_s">se ativado, a atualização será iniciada 1 minuto depois o App for aberto</string>
     <string name="behavior_main_t">Auto esconder a barra de ferramentas</string>

+ 0 - 1
app/src/main/res/values-zh-rHK/strings.xml

@@ -373,7 +373,6 @@
     <string name="page_anim_simulation">仿真</string>
     <string name="page_anim_scroll">滾動</string>
     <string name="page_anim_none">無動畫</string>
-    <string name="donate_s">此書源使用了高級功能,請到捐贈裏點擊支付寶紅包搜索碼領取紅包開啟。</string>
     <string name="up_change_source_last_chapter_t">後台更新換源最新章節</string>
     <string name="up_change_source_last_chapter_s">開啟則會在軟件打開 1 分鐘後開始更新</string>
     <string name="behavior_main_t">書架 ToolBar 自動隱藏</string>

+ 0 - 1
app/src/main/res/values-zh-rTW/strings.xml

@@ -375,7 +375,6 @@
     <string name="page_anim_simulation">模擬</string>
     <string name="page_anim_scroll">滾動</string>
     <string name="page_anim_none">無動畫</string>
-    <string name="donate_s">此書源使用了進階功能,請到捐贈裡點擊支付寶紅包搜尋碼領取紅包開啟。</string>
     <string name="up_change_source_last_chapter_t">後台更新換源最新章節</string>
     <string name="up_change_source_last_chapter_s">開啟則會在軟體打開1分鐘後開始更新</string>
     <string name="behavior_main_t">書架ToolBar自動隱藏</string>

+ 0 - 1
app/src/main/res/values-zh/strings.xml

@@ -375,7 +375,6 @@
     <string name="page_anim_simulation">仿真</string>
     <string name="page_anim_scroll">滚动</string>
     <string name="page_anim_none">无动画</string>
-    <string name="donate_s">此书源使用了高级功能,请到捐赠里点击支付宝红包搜索码领取红包开启。</string>
     <string name="up_change_source_last_chapter_t">后台更新换源最新章节</string>
     <string name="up_change_source_last_chapter_s">开启则会在软件打开 1 分钟后开始更新</string>
     <string name="behavior_main_t">书架工具栏自动隐藏</string>

+ 0 - 1
app/src/main/res/values/strings.xml

@@ -376,7 +376,6 @@
     <string name="page_anim_simulation">Simulation</string>
     <string name="page_anim_scroll">Scroll</string>
     <string name="page_anim_none">None</string>
-    <string name="donate_s">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.</string>
     <string name="up_change_source_last_chapter_t">Update the latest chapter after changed origin in the background</string>
     <string name="up_change_source_last_chapter_s">if enabled,the update will start 1 minute later when the software is run</string>
     <string name="behavior_main_t">Auto hide ToolBar</string>