Repair logger
This commit is contained in:
@@ -28,6 +28,7 @@ type TorrentManager struct {
|
||||
api *realdebrid.RealDebrid
|
||||
workerPool *ants.Pool
|
||||
log *logutil.Logger
|
||||
repairLog *logutil.Logger
|
||||
|
||||
DirectoryMap cmap.ConcurrentMap[string, cmap.ConcurrentMap[string, *Torrent]] // directory -> accessKey -> Torrent
|
||||
DownloadMap cmap.ConcurrentMap[string, *realdebrid.Download]
|
||||
@@ -52,7 +53,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 *ants.Pool, log *logutil.Logger) *TorrentManager {
|
||||
func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, workerPool *ants.Pool, log, repairLog *logutil.Logger) *TorrentManager {
|
||||
t := &TorrentManager{
|
||||
requiredVersion: "0.10.0",
|
||||
|
||||
@@ -60,6 +61,7 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, w
|
||||
api: api,
|
||||
workerPool: workerPool,
|
||||
log: log,
|
||||
repairLog: repairLog,
|
||||
|
||||
DirectoryMap: cmap.New[cmap.ConcurrentMap[string, *Torrent]](),
|
||||
DownloadMap: cmap.New[*realdebrid.Download](),
|
||||
|
||||
Reference in New Issue
Block a user