From 67e80c00a6ac6bfde17a2ff75fcad0c9a48cb648 Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Sat, 15 Oct 2022 13:40:58 +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/defaultData/directLinkUpload.json | 2 +- app/src/main/java/io/legado/app/lib/webdav/WebDav.kt | 4 ++-- app/src/main/java/io/legado/app/ui/book/search/SearchScope.kt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/assets/defaultData/directLinkUpload.json b/app/src/main/assets/defaultData/directLinkUpload.json index 57dd4b0b6..b74237185 100644 --- a/app/src/main/assets/defaultData/directLinkUpload.json +++ b/app/src/main/assets/defaultData/directLinkUpload.json @@ -1,5 +1,5 @@ { - "uploadUrl": "http://sy.mgz6.cc/shuyuan,{\"method\":\"POST\",\"body\": {\"file\": \"fileRequest\"},\"type\": \"multipart/form-data\"}", + "uploadUrl": "https://sy.mgz6.cc/shuyuan,{\"method\":\"POST\",\"body\": {\"file\": \"fileRequest\"},\"type\": \"multipart/form-data\"}", "downloadUrlRule": "$.data@js:if (result == '') \n '' \n else \n 'https://shuyuan.mgz6.cc/shuyuan/' + result", "summary": "有效期2天" } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/lib/webdav/WebDav.kt b/app/src/main/java/io/legado/app/lib/webdav/WebDav.kt index d028d4953..8ceeafe93 100644 --- a/app/src/main/java/io/legado/app/lib/webdav/WebDav.kt +++ b/app/src/main/java/io/legado/app/lib/webdav/WebDav.kt @@ -358,9 +358,9 @@ open class WebDav(val path: String, val authorization: Authorization) { val exception = document.getElementsByTag("s:exception").firstOrNull()?.text() val message = document.getElementsByTag("s:message").firstOrNull()?.text() if (exception == "ObjectNotFound") { - throw ObjectNotFoundException(message ?: "$path doesn't exist") + throw ObjectNotFoundException(message ?: "$path doesn't exist. code:${response.code}") } - throw WebDavException(message ?: "未知错误") + throw WebDavException(message ?: "未知错误 code:${response.code}") } } diff --git a/app/src/main/java/io/legado/app/ui/book/search/SearchScope.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchScope.kt index 3c2994efa..331161f09 100644 --- a/app/src/main/java/io/legado/app/ui/book/search/SearchScope.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchScope.kt @@ -54,9 +54,9 @@ data class SearchScope(private var scope: String) { } if (list.isEmpty()) { list.add("全部书源") + } + return list } - return list - } /** * 搜索范围书源