Reunify workers, add commands
This commit is contained in:
@@ -31,10 +31,8 @@ type TorrentManager struct {
|
||||
latestState *LibraryState
|
||||
requiredVersion string
|
||||
workerPool *ants.Pool
|
||||
refreshPool *ants.Pool
|
||||
RefreshKillSwitch chan struct{}
|
||||
RepairKillSwitch chan struct{}
|
||||
repairPool *ants.Pool
|
||||
repairTrigger chan *Torrent
|
||||
repairSet mapset.Set[*Torrent]
|
||||
repairRunning bool
|
||||
@@ -45,7 +43,7 @@ type TorrentManager struct {
|
||||
// NewTorrentManager creates a new torrent manager
|
||||
// it will fetch all torrents and their info in the background
|
||||
// and store them in-memory and cached in files
|
||||
func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, workerPool, refreshPool, repairPool *ants.Pool, log *logutil.Logger) *TorrentManager {
|
||||
func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, workerPool *ants.Pool, log *logutil.Logger) *TorrentManager {
|
||||
t := &TorrentManager{
|
||||
Config: cfg,
|
||||
Api: api,
|
||||
@@ -58,8 +56,6 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, w
|
||||
latestState: &LibraryState{},
|
||||
requiredVersion: "0.9.3-hotfix.4",
|
||||
workerPool: workerPool,
|
||||
refreshPool: refreshPool,
|
||||
repairPool: repairPool,
|
||||
log: log,
|
||||
}
|
||||
t.fixers = t.readFixersFromFile()
|
||||
|
||||
Reference in New Issue
Block a user