Repairs
This commit is contained in:
@@ -24,11 +24,11 @@ func (t *TorrentManager) RefreshTorrents() []string {
|
||||
|
||||
for i := range instances {
|
||||
idx := i
|
||||
wg.Add(1)
|
||||
_ = t.workerPool.Submit(func() {
|
||||
defer wg.Done()
|
||||
infoChan <- t.getMoreInfo(instances[idx])
|
||||
})
|
||||
wg.Add(1)
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
@@ -168,7 +168,6 @@ func (t *TorrentManager) getMoreInfo(rdTorrent realdebrid.Torrent) *Torrent {
|
||||
OriginalName: info.OriginalName,
|
||||
Added: info.Added,
|
||||
Hash: info.Hash,
|
||||
Lock: &sync.Mutex{},
|
||||
}
|
||||
// SelectedFiles is a subset of Files with only the selected ones
|
||||
// it also has a Link field, which can be empty
|
||||
@@ -234,7 +233,6 @@ func (t *TorrentManager) mergeToMain(existing, toMerge *Torrent) Torrent {
|
||||
Unfixable: existing.Unfixable || toMerge.Unfixable,
|
||||
UnassignedLinks: existing.UnassignedLinks.Union(toMerge.UnassignedLinks),
|
||||
BrokenLinks: existing.BrokenLinks.Union(toMerge.BrokenLinks),
|
||||
Lock: &sync.Mutex{},
|
||||
}
|
||||
|
||||
// this function triggers only when we have a new DownloadedID
|
||||
|
||||
Reference in New Issue
Block a user