|
|
@ -50,6 +50,7 @@ class DownloadService : BaseService() { |
|
|
|
val webBook = WebBook(bookSource) |
|
|
|
val webBook = WebBook(bookSource) |
|
|
|
for (index in start..end) { |
|
|
|
for (index in start..end) { |
|
|
|
App.db.bookChapterDao().getChapter(bookUrl, index)?.let { chapter -> |
|
|
|
App.db.bookChapterDao().getChapter(bookUrl, index)?.let { chapter -> |
|
|
|
|
|
|
|
if (!BookHelp.hasContent(book, chapter)) { |
|
|
|
webBook.getContent(book, chapter, scope = this, context = searchPool) |
|
|
|
webBook.getContent(book, chapter, scope = this, context = searchPool) |
|
|
|
.onStart { |
|
|
|
.onStart { |
|
|
|
updateNotification("${chapter.title}开始下载") |
|
|
|
updateNotification("${chapter.title}开始下载") |
|
|
@ -64,6 +65,7 @@ class DownloadService : BaseService() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 更新通知 |
|
|
|
* 更新通知 |
|
|
|