More efficient repairs
This commit is contained in:
@@ -69,7 +69,6 @@ func (gf *GetFile) HandleGetRequest(directory, torrentName, fileName string, res
|
||||
// log.Warnf("File %s is no longer available, link %s", filepath.Base(file.Path), link)
|
||||
file.Link = "repairing"
|
||||
torMgr.Repair(torrent)
|
||||
torMgr.UpdateTorrentResponseCache(torrent)
|
||||
http.Error(resp, "File is not available", http.StatusNotFound)
|
||||
return
|
||||
} else {
|
||||
@@ -151,7 +150,6 @@ func (gf *GetFile) streamFileToResponse(torrent *intTor.Torrent, file *intTor.Fi
|
||||
log.Warnf("Cannot download file %s: %v", file.Path, err)
|
||||
file.Link = "repairing"
|
||||
torMgr.Repair(torrent)
|
||||
torMgr.UpdateTorrentResponseCache(torrent)
|
||||
}
|
||||
http.Error(resp, "File is not available", http.StatusNotFound)
|
||||
return
|
||||
@@ -163,7 +161,6 @@ func (gf *GetFile) streamFileToResponse(torrent *intTor.Torrent, file *intTor.Fi
|
||||
log.Warnf("Received a %s status code for file %s", download.Status, file.Path)
|
||||
file.Link = "repairing"
|
||||
torMgr.Repair(torrent)
|
||||
torMgr.UpdateTorrentResponseCache(torrent)
|
||||
}
|
||||
http.Error(resp, "File is not available", http.StatusNotFound)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user