优化
This commit is contained in:
@@ -121,7 +121,8 @@ class CacheBookService : BaseService() {
|
|||||||
book.totalChapterNum = 0
|
book.totalChapterNum = 0
|
||||||
book.save()
|
book.save()
|
||||||
}
|
}
|
||||||
AppLog.put("《$name》目录为空且加载目录失败\n${it.localizedMessage}", it, true)
|
val msg = "《$name》目录为空且加载目录失败\n${it.localizedMessage}"
|
||||||
|
AppLog.put(msg, it, true)
|
||||||
return@execute
|
return@execute
|
||||||
}.getOrNull()?.let { toc ->
|
}.getOrNull()?.let { toc ->
|
||||||
appDb.bookChapterDao.insert(*toc.toTypedArray())
|
appDb.bookChapterDao.insert(*toc.toTypedArray())
|
||||||
@@ -137,8 +138,10 @@ class CacheBookService : BaseService() {
|
|||||||
cacheBook.addDownload(start, end2)
|
cacheBook.addDownload(start, end2)
|
||||||
notificationContent = CacheBook.downloadSummary
|
notificationContent = CacheBook.downloadSummary
|
||||||
upCacheBookNotification()
|
upCacheBookNotification()
|
||||||
if (downloadJob == null) {
|
synchronized(this) {
|
||||||
download()
|
if (downloadJob == null) {
|
||||||
|
download()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user