Fix checkboxes and bulk download

This commit is contained in:
Geomitron
2023-12-25 10:29:57 -06:00
parent 5644ea2447
commit 199374b2e2
12 changed files with 66 additions and 126 deletions

View File

@@ -67,13 +67,17 @@ export class DownloadQueue {
}
remove(md5: string) {
if (this.downloadQueue[0]?.md5 === md5) {
this.downloadQueue[0].cancel()
const currentDownload = this.downloadQueue[0]
if (currentDownload?.md5 === md5) {
currentDownload.cancel()
this.downloadRunning = false
}
this.downloadQueue = this.downloadQueue.filter(cd => cd.md5 !== md5)
this.retryQueue = this.retryQueue.filter(cd => cd.md5 !== md5)
this.erroredQueue = this.erroredQueue.filter(cd => cd.md5 !== md5)
if (currentDownload) {
this.moveQueue()
}
emitIpcEvent('downloadQueueUpdate', {
md5,