diff --git a/app/src/main/java/io/legado/app/data/dao/BookDao.kt b/app/src/main/java/io/legado/app/data/dao/BookDao.kt index 71a8651b3..482be53e9 100644 --- a/app/src/main/java/io/legado/app/data/dao/BookDao.kt +++ b/app/src/main/java/io/legado/app/data/dao/BookDao.kt @@ -33,7 +33,7 @@ interface BookDao { fun getBook(bookUrl: String): Book? @get:Query("SELECT * FROM books where origin <> '${BookType.local}'") - val webBooks: List + val hasUpdateBooks: List @get:Query("SELECT * FROM books") val allBooks: List diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt index 7f116694e..806cff675 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt @@ -35,7 +35,7 @@ class BookshelfViewModel(application: Application) : BaseViewModel(application) fun downloadAll() { execute { - App.db.bookDao().webBooks.forEach { book -> + App.db.bookDao().hasUpdateBooks.forEach { book -> Download.start(context, book.bookUrl, book.durChapterIndex, book.totalChapterNum) } }