mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
59c13fea36
commit
9fd0567122
@ -11,6 +11,11 @@
|
||||
* 正文出现缺字漏字、内容缺失、排版错乱等情况,有可能是净化规则或简繁转换出现问题。
|
||||
* 漫画源看书显示乱码,**阅读与其他软件的源并不通用**,请导入阅读的支持的漫画源!
|
||||
|
||||
**2022/10/30**
|
||||
|
||||
* 发现不采用详情页url正则
|
||||
* 目录更新完再缓存章节,缓存章节可以设置为0,为0时不缓存
|
||||
|
||||
**2022/10/29**
|
||||
|
||||
* 更新cronet: 107.0.5304.91
|
||||
@ -18,7 +23,6 @@
|
||||
* 多页目录和正文添加并发访问限制
|
||||
* 阅读界面点击区域支持更多选项,中间区域也可设置
|
||||
* 朗读服务和音频服务添加唤醒锁配置
|
||||
* 发现不采用详情页url正则
|
||||
|
||||
**2022/10/22**
|
||||
|
||||
|
@ -174,6 +174,14 @@ class MainViewModel(application: Application) : BaseViewModel(application) {
|
||||
waitUpTocBooks.remove(bookUrl)
|
||||
onUpTocBooks.remove(bookUrl)
|
||||
postEvent(EventBus.UP_BOOKSHELF, bookUrl)
|
||||
if (waitUpTocBooks.isEmpty()
|
||||
&& onUpTocBooks.isEmpty()
|
||||
&& cacheBookJob == null
|
||||
&& !CacheBookService.isRun
|
||||
) {
|
||||
//所有目录更新完再开始缓存章节
|
||||
cacheBook()
|
||||
}
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
@ -185,9 +193,6 @@ class MainViewModel(application: Application) : BaseViewModel(application) {
|
||||
)
|
||||
val cacheBook = CacheBook.getOrCreate(source, book)
|
||||
cacheBook.addDownload(book.durChapterIndex, endIndex)
|
||||
if (cacheBookJob == null && !CacheBookService.isRun) {
|
||||
cacheBook()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -205,7 +210,11 @@ class MainViewModel(application: Application) : BaseViewModel(application) {
|
||||
CacheBook.cacheBookMap.forEach {
|
||||
val cacheBookModel = it.value
|
||||
while (cacheBookModel.waitCount > 0) {
|
||||
if (CacheBook.onDownloadCount < threadCount) {
|
||||
//有目录更新是不缓存,优先更新目录,现在更多网站限制并发
|
||||
if (waitUpTocBooks.isEmpty()
|
||||
&& onUpTocBooks.isEmpty()
|
||||
&& CacheBook.onDownloadCount < threadCount
|
||||
) {
|
||||
cacheBookModel.download(this, upTocPool)
|
||||
} else {
|
||||
delay(100)
|
||||
|
Loading…
Reference in New Issue
Block a user