Reinsert the broken files
This commit is contained in:
@@ -134,22 +134,6 @@ func (t *TorrentManager) repair(torrent *Torrent) {
|
||||
return
|
||||
}
|
||||
|
||||
if torrent.OlderThanDuration(EXPIRED_LINK_TOLERANCE_HOURS * time.Hour) {
|
||||
// first solution: reinsert with same selection
|
||||
t.log.Infof("Torrent %s is older than %d hours, reinserting it", t.GetKey(torrent), EXPIRED_LINK_TOLERANCE_HOURS)
|
||||
if t.reinsertTorrent(torrent, "") {
|
||||
t.log.Infof("Successfully downloaded torrent %s to repair it", t.GetKey(torrent))
|
||||
return
|
||||
} else if torrent.Unfixable {
|
||||
t.log.Warnf("Cannot repair torrent %s", t.GetKey(torrent))
|
||||
return
|
||||
} else {
|
||||
t.log.Warnf("Failed to repair by reinserting torrent %s, will only redownload broken files...", t.GetKey(torrent))
|
||||
}
|
||||
} else {
|
||||
t.log.Warnf("Torrent %s is not older than %d hours to be repaired by reinsertion, will only redownload broken files...", t.GetKey(torrent), EXPIRED_LINK_TOLERANCE_HOURS)
|
||||
}
|
||||
|
||||
// handle torrents with incomplete links for selected files
|
||||
assignedCount := 0
|
||||
rarCount := 0
|
||||
|
||||
Reference in New Issue
Block a user