Trigger refresh library instead of repair
This commit is contained in:
@@ -58,7 +58,7 @@ func (dl *Downloader) DownloadFile(directory, torrentName, fileName string, resp
|
||||
if cfg.EnableRepair() {
|
||||
torrent.BrokenLinks.Add(file.Link)
|
||||
file.Link = "repair"
|
||||
torMgr.Repair(torrent)
|
||||
torMgr.SetNewLatestState(intTor.LibraryState{})
|
||||
} else {
|
||||
log.Infof("Repair is disabled, skipping repair for unavailable file %s (link=%s)", fileName, link)
|
||||
}
|
||||
@@ -162,7 +162,7 @@ func (dl *Downloader) streamFileToResponse(torrent *intTor.Torrent, file *intTor
|
||||
if cfg.EnableRepair() && torrent != nil {
|
||||
torrent.BrokenLinks.Add(file.Link)
|
||||
file.Link = "repair"
|
||||
torMgr.Repair(torrent)
|
||||
torMgr.SetNewLatestState(intTor.LibraryState{})
|
||||
} else {
|
||||
log.Infof("Repair is disabled, skipping repair for unavailable file %s (link=%s)", file.Path, file.Link)
|
||||
}
|
||||
@@ -178,7 +178,7 @@ func (dl *Downloader) streamFileToResponse(torrent *intTor.Torrent, file *intTor
|
||||
if cfg.EnableRepair() && torrent != nil {
|
||||
torrent.BrokenLinks.Add(file.Link)
|
||||
file.Link = "repair"
|
||||
torMgr.Repair(torrent)
|
||||
torMgr.SetNewLatestState(intTor.LibraryState{})
|
||||
} else {
|
||||
log.Infof("Repair is disabled, skipping repair for unavailable file %s (link=%s)", file.Path, file.Link)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user