Implemented removeFinishedDownloads and started working on queue restore

This commit is contained in:
RemixDev
2021-05-13 23:19:59 +02:00
parent 024d7e3998
commit de85a39718
5 changed files with 113 additions and 7 deletions

View File

@@ -1,3 +1,7 @@
import saveSettings from './saveSettings'
import removeFinishedDownloads from './removeFinishedDownloads'
export default [saveSettings]
export default [
saveSettings,
removeFinishedDownloads
]

View File

@@ -0,0 +1,12 @@
import { Server as WsServer } from 'ws'
import { consoleInfo } from '../../helpers/errors'
import { clearCompletedDownloads } from '../../main'
const eventName = 'removeFinishedDownloads'
const cb = (_: any, __: any, ___: WsServer) => {
clearCompletedDownloads()
consoleInfo('Completed downloads cleared')
}
export default { eventName, cb }