Implemented Dowloads front-end

This commit is contained in:
Aria Moradi
2021-05-30 04:01:49 +04:30
parent 224c24ee9f
commit 5023e96301
13 changed files with 285 additions and 29 deletions

View File

@@ -83,6 +83,7 @@ object DownloadManager {
)
)
)
start()
}
notifyAllClients()
}
@@ -93,10 +94,14 @@ object DownloadManager {
}
fun start() {
if (downloader != null && !downloader?.isAlive!!) // doesn't exist or is dead
downloader = null
if (downloader == null) {
downloader = Downloader(downloadQueue) { notifyAllClients() }
downloader!!.start()
}
notifyAllClients()
}