From 85c6273b90e0d0046c1f9cdb61acfaed12e2034c Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Mon, 9 Jan 2023 13:25:34 +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 --- app/src/main/assets/help/webDavHelp.md | 6 +++++- .../java/io/legado/app/ui/config/BackupConfigFragment.kt | 2 +- app/src/main/java/io/legado/app/utils/JsoupExtensions.kt | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/assets/help/webDavHelp.md b/app/src/main/assets/help/webDavHelp.md index dee978b42..50bbcb13a 100644 --- a/app/src/main/assets/help/webDavHelp.md +++ b/app/src/main/assets/help/webDavHelp.md @@ -16,4 +16,8 @@ ### 自动备份说明 * 设置好备份之后每次退出App会自动进行备份 -* WebDav同一天的备份会覆盖,不同日期的备份不会覆盖 \ No newline at end of file +* WebDav同一天的备份会覆盖,不同日期的备份不会覆盖 + +### 手动恢复备份说明 + +* 从WebDav手动下载备份文件需要解压才能恢复 \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt index 505ac1dc1..feddfa9fc 100644 --- a/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt @@ -333,7 +333,7 @@ class BackupConfigFragment : PreferenceFragment(), AppLog.put("恢复备份出错WebDavError\n${it.localizedMessage}", it) alert { setTitle(R.string.restore) - setMessage("WebDavError\n${it.localizedMessage}\n将从本地备份恢复。") + setMessage("WebDavError\n${it.localizedMessage}\n将从本地备份恢复。\n从WebDav手动下载备份文件需要解压才能恢复。") okButton { restoreFromLocal() } diff --git a/app/src/main/java/io/legado/app/utils/JsoupExtensions.kt b/app/src/main/java/io/legado/app/utils/JsoupExtensions.kt index 0b68555c0..b86ca225d 100644 --- a/app/src/main/java/io/legado/app/utils/JsoupExtensions.kt +++ b/app/src/main/java/io/legado/app/utils/JsoupExtensions.kt @@ -45,7 +45,7 @@ fun Element.findNS(tag: String, namespace: HashSet): Elements { } fun Element.findNSPrefix(namespaceURI: String): HashSet { - return select("[^xmlns]").map { element -> + return select("[^xmlns:]").map { element -> element.attributes().filter { it.value == namespaceURI }.map { it.key.substring(6) } }.flatten().toHashSet() }