|
|
@ -151,7 +151,6 @@ class DownloadService : BaseService() { |
|
|
|
|
|
|
|
|
|
|
|
private fun download() { |
|
|
|
private fun download() { |
|
|
|
downloadingCount += 1 |
|
|
|
downloadingCount += 1 |
|
|
|
Download.addLog("downloadingCount++") |
|
|
|
|
|
|
|
tasks.add(Coroutine.async(this, context = searchPool) { |
|
|
|
tasks.add(Coroutine.async(this, context = searchPool) { |
|
|
|
if (!isActive) return@async |
|
|
|
if (!isActive) return@async |
|
|
|
val bookChapter: BookChapter? = synchronized(this@DownloadService) { |
|
|
|
val bookChapter: BookChapter? = synchronized(this@DownloadService) { |
|
|
@ -228,8 +227,6 @@ class DownloadService : BaseService() { |
|
|
|
|
|
|
|
|
|
|
|
private fun postDownloading(hasChapter: Boolean) { |
|
|
|
private fun postDownloading(hasChapter: Boolean) { |
|
|
|
downloadingCount -= 1 |
|
|
|
downloadingCount -= 1 |
|
|
|
Download.addLog("downloadingCount--") |
|
|
|
|
|
|
|
Download.addLog("downloadingCount $downloadingCount") |
|
|
|
|
|
|
|
if (hasChapter) { |
|
|
|
if (hasChapter) { |
|
|
|
download() |
|
|
|
download() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|