Remove fixer concept

This commit is contained in:
Ben Sarmiento
2024-05-22 04:27:12 +02:00
parent 9990bf90ca
commit 2a5f12e37f
4 changed files with 40 additions and 198 deletions

View File

@@ -40,11 +40,11 @@ type TorrentManager struct {
latestState *LibraryState
fixers cmap.ConcurrentMap[string, string] // trigger -> [command, id]
repairTrigger chan *Torrent
repairSet mapset.Set[*Torrent]
repairRunning bool
repairRunningMu sync.Mutex
trashBin mapset.Set[string]
}
// NewTorrentManager creates a new torrent manager
@@ -71,10 +71,10 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, w
latestState: &LibraryState{log: log},
}
t.fixers = t.readFixersFromFile()
t.trashBin = mapset.NewSet[string]()
t.initializeDirectories()
t.workerPool.Submit(func() {
t.refreshTorrents(true)
t.refreshTorrents()
t.setNewLatestState(t.getCurrentState())
t.StartRefreshJob()
t.StartRepairJob()