feat: 修复下载bug

pull/274/head
gedoor 4 years ago
parent d9c55c783d
commit d9a11d83df
  1. 12
      app/src/main/java/io/legado/app/service/DownloadService.kt

@ -93,9 +93,9 @@ class DownloadService : BaseService() {
book = bookMap[bookUrl] book = bookMap[bookUrl]
if (book == null) { if (book == null) {
book = App.db.bookDao().getBook(bookUrl) book = App.db.bookDao().getBook(bookUrl)
} if (book == null) {
if (book == null) { removeDownload(bookUrl)
removeDownload(bookUrl) }
} }
} }
} }
@ -111,9 +111,9 @@ class DownloadService : BaseService() {
App.db.bookSourceDao().getBookSource(origin)?.let { App.db.bookSourceDao().getBookSource(origin)?.let {
webBook = WebBook(it) webBook = WebBook(it)
} }
} if (webBook == null) {
if (webBook == null) { removeDownload(bookUrl)
removeDownload(bookUrl) }
} }
} }
} }

Loading…
Cancel
Save