pull/1395/head
gedoor 3 years ago
parent 4759cd4173
commit 84ce343895
  1. 9
      app/src/main/java/io/legado/app/api/controller/BookSourceController.kt

@ -46,13 +46,14 @@ object BookSourceController {
val okSources = arrayListOf<BookSource>()
val bookSources = GSON.fromJsonArray<BookSource>(postData)
if (bookSources != null) {
for (bookSource in bookSources) {
if (bookSource.bookSourceName.isBlank() || bookSource.bookSourceUrl.isBlank()) {
continue
}
bookSources.forEach { bookSource ->
if (bookSource.bookSourceName.isNotBlank()
&& bookSource.bookSourceUrl.isNotBlank()
) {
appDb.bookSourceDao.insert(bookSource)
okSources.add(bookSource)
}
}
} else {
return ReturnData().setErrorMsg("转换源失败")
}

Loading…
Cancel
Save