Feature/automatically download new chapters (#596)

* Automatically download new chapters

* Log queued downloads

* Add function to get number of manga chapters
This commit is contained in:
schroda
2023-07-20 23:47:46 +02:00
committed by GitHub
parent c1d702a51c
commit 8690e918dd
6 changed files with 59 additions and 5 deletions

View File

@@ -122,7 +122,7 @@ object DownloadManager {
scope.launch {
downloaderWatch.sample(1.seconds).collect {
val runningDownloaders = downloaders.values.filter { it.isActive }
logger.info { "Running: ${runningDownloaders.size}" }
logger.info { "Running: ${runningDownloaders.size}, Queued: ${downloadQueue.size}" }
if (runningDownloaders.size < MAX_SOURCES_IN_PARAllEL) {
downloadQueue.asSequence()
.map { it.manga.sourceId.toLong() }