Reunify workers, add commands

This commit is contained in:
Ben Sarmiento
2024-01-30 16:27:12 +01:00
parent 4e389fa79c
commit 7794e641ab
7 changed files with 29 additions and 54 deletions

View File

@@ -36,16 +36,14 @@ func init() {
chi.RegisterMethod("MOVE")
}
func AttachHandlers(router *chi.Mux, downloader *universal.Downloader, torMgr *torrent.TorrentManager, cfg config.ConfigInterface, api *realdebrid.RealDebrid, workerPool, refreshPool, repairPool *ants.Pool, log *logutil.Logger) {
func AttachHandlers(router *chi.Mux, downloader *universal.Downloader, torMgr *torrent.TorrentManager, cfg config.ConfigInterface, api *realdebrid.RealDebrid, workerPool *ants.Pool, log *logutil.Logger) {
hs := &Handlers{
downloader: downloader,
torMgr: torMgr,
cfg: cfg,
api: api,
workerPool: workerPool,
refreshPool: refreshPool,
repairPool: repairPool,
log: log,
downloader: downloader,
torMgr: torMgr,
cfg: cfg,
api: api,
workerPool: workerPool,
log: log,
}
if cfg.GetUsername() != "" {