Rework repair logic

This commit is contained in:
Ben Sarmiento
2024-01-26 08:36:30 +01:00
parent b2bd188736
commit 92a507c693
5 changed files with 179 additions and 137 deletions

View File

@@ -29,7 +29,7 @@ type TorrentManager struct {
DownloadMap cmap.ConcurrentMap[string, *realdebrid.Download]
fixers cmap.ConcurrentMap[string, *Torrent]
repairs mapset.Set[string]
ensureDelete mapset.Set[string]
deleteOnceDone mapset.Set[string]
allAccessKeys mapset.Set[string]
latestState *LibraryState
requiredVersion string
@@ -50,7 +50,7 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, w
DownloadMap: cmap.New[*realdebrid.Download](),
fixers: cmap.New[*Torrent](),
repairs: mapset.NewSet[string](),
ensureDelete: mapset.NewSet[string](),
deleteOnceDone: mapset.NewSet[string](),
allAccessKeys: mapset.NewSet[string](),
latestState: &LibraryState{},
requiredVersion: "24.01.2024",