Full selection is broken, dont redownload it
This commit is contained in:
@@ -222,6 +222,7 @@ func (t *TorrentManager) repair(torrent *Torrent) {
|
||||
|
||||
t.log.Infof("Repairing by downloading 2 batches of the broken %d files of torrent %s", len(brokenFiles), t.GetKey(torrent))
|
||||
|
||||
oldTorrentIDs := torrent.DownloadedIDs.Union(torrent.InProgressIDs).ToSlice()
|
||||
// divide the broken files into 2 groups
|
||||
group1 := make([]*File, 0)
|
||||
group2 := make([]*File, 0)
|
||||
@@ -246,7 +247,9 @@ func (t *TorrentManager) repair(torrent *Torrent) {
|
||||
return
|
||||
}
|
||||
if redownloadedInfo2 != nil {
|
||||
t.fixerAddCommand(redownloadedInfo2.ID, fmt.Sprintf("repaired_with:%s", redownloadedInfo1.ID))
|
||||
for _, oldId := range oldTorrentIDs {
|
||||
t.fixerAddCommand(oldId, "replaced")
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user