Repair logs

This commit is contained in:
Ben Sarmiento
2023-12-10 18:45:26 +01:00
parent 788e19de8f
commit fef347425e
3 changed files with 12 additions and 7 deletions

View File

@@ -80,7 +80,7 @@ func (gf *GetFile) HandleGetRequest(directory, torrentName, fileName string, res
file.Link = "repairing"
torMgr.Repair(torrent)
} else {
log.Info("Repair is disabled, skipping repair for unavailable file")
log.Infof("Repair is disabled, skipping repair for unavailable file %s (link=%s)", fileName, link)
}
http.Error(resp, "File is not available", http.StatusNotFound)
return
@@ -172,7 +172,7 @@ func (gf *GetFile) streamFileToResponse(torrent *intTor.Torrent, file *intTor.Fi
file.Link = "repairing"
torMgr.Repair(torrent)
} else {
log.Info("Repair is disabled, skipping repair for unavailable file")
log.Infof("Repair is disabled, skipping repair for unavailable file %s (link=%s)", file.Path, file.Link)
}
}
http.Error(resp, "File is not available", http.StatusNotFound)
@@ -187,7 +187,7 @@ func (gf *GetFile) streamFileToResponse(torrent *intTor.Torrent, file *intTor.Fi
file.Link = "repairing"
torMgr.Repair(torrent)
} else {
log.Info("Repair is disabled, skipping repair for unavailable file")
log.Infof("Repair is disabled, skipping repair for unavailable file %s (link=%s)", file.Path, file.Link)
}
}
http.Error(resp, "File is not available", http.StatusNotFound)