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() {
|
if cfg.EnableRepair() {
|
||||||
torrent.BrokenLinks.Add(file.Link)
|
torrent.BrokenLinks.Add(file.Link)
|
||||||
file.Link = "repair"
|
file.Link = "repair"
|
||||||
torMgr.Repair(torrent)
|
torMgr.SetNewLatestState(intTor.LibraryState{})
|
||||||
} else {
|
} else {
|
||||||
log.Infof("Repair is disabled, skipping repair for unavailable file %s (link=%s)", fileName, link)
|
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 {
|
if cfg.EnableRepair() && torrent != nil {
|
||||||
torrent.BrokenLinks.Add(file.Link)
|
torrent.BrokenLinks.Add(file.Link)
|
||||||
file.Link = "repair"
|
file.Link = "repair"
|
||||||
torMgr.Repair(torrent)
|
torMgr.SetNewLatestState(intTor.LibraryState{})
|
||||||
} else {
|
} else {
|
||||||
log.Infof("Repair is disabled, skipping repair for unavailable file %s (link=%s)", file.Path, file.Link)
|
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 {
|
if cfg.EnableRepair() && torrent != nil {
|
||||||
torrent.BrokenLinks.Add(file.Link)
|
torrent.BrokenLinks.Add(file.Link)
|
||||||
file.Link = "repair"
|
file.Link = "repair"
|
||||||
torMgr.Repair(torrent)
|
torMgr.SetNewLatestState(intTor.LibraryState{})
|
||||||
} else {
|
} else {
|
||||||
log.Infof("Repair is disabled, skipping repair for unavailable file %s (link=%s)", file.Path, file.Link)
|
log.Infof("Repair is disabled, skipping repair for unavailable file %s (link=%s)", file.Path, file.Link)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user