mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 14:19:38 +00:00
13 lines
442 B
TypeScript
13 lines
442 B
TypeScript
import { Download } from '../../src-shared/interfaces/download.interface'
|
|
import { DownloadQueue } from './download/DownloadQueue'
|
|
|
|
const downloadQueue: DownloadQueue = new DownloadQueue()
|
|
|
|
export async function download(data: Download) {
|
|
switch (data.action) {
|
|
case 'add': downloadQueue.add(data.md5, data.chartName!); break
|
|
case 'retry': downloadQueue.retry(data.md5); break
|
|
case 'remove': downloadQueue.remove(data.md5); break
|
|
}
|
|
}
|