Xwite 4 лет назад
Родитель
Сommit
812d564edc

+ 2 - 2
app/src/main/java/io/legado/app/model/Debug.kt

@@ -56,8 +56,8 @@ object Debug {
                 if (showTime && debugTimeMap[sourceUrl] != null) {
                 if (showTime && debugTimeMap[sourceUrl] != null) {
                     val time =
                     val time =
                         debugTimeFormat.format(Date(System.currentTimeMillis() - debugTimeMap[sourceUrl]!!))
                         debugTimeFormat.format(Date(System.currentTimeMillis() - debugTimeMap[sourceUrl]!!))
-                    printMsg = "$time $printMsg"
-                    debugMessageMap[sourceUrl] = printMsg
+                    printMsg = printMsg.substring(1)
+                    debugMessageMap[sourceUrl] = "$time $printMsg"
                 }
                 }
             }
             }
         }
         }

+ 2 - 2
app/src/main/java/io/legado/app/model/webBook/BookChapterList.kt

@@ -194,10 +194,10 @@ object BookChapterList {
                 if (bookChapter.url.isEmpty()) {
                 if (bookChapter.url.isEmpty()) {
                     if (bookChapter.isVolume) {
                     if (bookChapter.isVolume) {
                         bookChapter.url = bookChapter.title + index
                         bookChapter.url = bookChapter.title + index
-                        Debug.log(bookSource.bookSourceUrl, "一级目录${index}未获取到url,使用${bookChapter.title}${index}替代")
+                        Debug.log(bookSource.bookSourceUrl, "⇒一级目录${index}未获取到url,使用标题替代")
                     } else {
                     } else {
                         bookChapter.url = baseUrl
                         bookChapter.url = baseUrl
-                        Debug.log(bookSource.bookSourceUrl, "目录${index}未获取到url,使用baseUrl替代")
+                        Debug.log(bookSource.bookSourceUrl, "⇒目录${index}未获取到url,使用baseUrl替代")
                     }
                     }
                 }
                 }
                 if (bookChapter.title.isNotEmpty()) {
                 if (bookChapter.title.isNotEmpty()) {

+ 5 - 1
app/src/main/java/io/legado/app/service/CheckSourceService.kt

@@ -133,8 +133,12 @@ class CheckSourceService : BaseService() {
                     throw NoStackTraceException("搜索内容为空并且没有发现")
                     throw NoStackTraceException("搜索内容为空并且没有发现")
                 }
                 }
                 books = WebBook.exploreBookAwait(this, source, url)
                 books = WebBook.exploreBookAwait(this, source, url)
+                if (books.isEmpty()) {
+                    throw NoStackTraceException("发现书籍为空")
+                }
+            } else {
+                source.removeGroup("搜索失效")
             }
             }
-            source.removeGroup("搜索失效")
             var book = books.first().toBook()
             var book = books.first().toBook()
             if (book.tocUrl.isBlank()) {
             if (book.tocUrl.isBlank()) {
                 book = WebBook.getBookInfoAwait(this, source, book)
                 book = WebBook.getBookInfoAwait(this, source, book)