move assignment of links to repair
This commit is contained in:
@@ -165,6 +165,10 @@ func (t *TorrentManager) Repair(torrent *Torrent, wg *sync.WaitGroup) {
|
||||
func (t *TorrentManager) repair(torrent *Torrent) {
|
||||
t.repairLog.Infof("Started repair process for torrent %s (ids=%v)", t.GetKey(torrent), torrent.DownloadedIDs.ToSlice())
|
||||
|
||||
if torrent.UnassignedLinks.Cardinality() > 0 && !t.assignLinks(torrent) {
|
||||
return
|
||||
}
|
||||
|
||||
// check for other broken files
|
||||
torrent.SelectedFiles.IterCb(func(_ string, file *File) {
|
||||
if !file.State.Is("ok_file") {
|
||||
|
||||
Reference in New Issue
Block a user