@ -70,10 +70,10 @@ class CacheBook(var bookSource: BookSource, var book: Book) {
}
fun start(context: Context, book: Book, start: Int, end: Int) {
fun start(context: Context, bookUrl: String, start: Int, end: Int) {
context.startService<CacheBookService> {
action = IntentAction.start
putExtra("bookUrl", book.bookUrl)
putExtra("bookUrl", bookUrl)
putExtra("start", start)
putExtra("end", end)
@ -76,6 +76,7 @@ class CacheBookService : BaseService() {
execute {
val cacheBook = CacheBook.getOrCreate(bookUrl) ?: return@execute
cacheBook.addDownload(start, end)
upNotification(CacheBook.downloadSummary)
if (downloadJob == null) {
download()