Repair 503 links

This commit is contained in:
Ben Sarmiento
2024-01-06 15:14:49 +01:00
parent 808e3a4443
commit 7b20f95703

View File

@@ -74,7 +74,7 @@ func (gf *GetFile) ServeFile(directory, torrentName, fileName string, resp http.
log.Debugf("Opening file %s from torrent %s (%s)", fileName, torrentName, link) log.Debugf("Opening file %s from torrent %s (%s)", fileName, torrentName, link)
unrestrict := torMgr.UnrestrictUntilOk(link) unrestrict := torMgr.UnrestrictUntilOk(link)
if unrestrict == nil { if unrestrict == nil || unrestrict.Link == "" {
log.Warnf("File %s cannot be unrestricted (link=%s)", fileName, link) log.Warnf("File %s cannot be unrestricted (link=%s)", fileName, link)
if cfg.EnableRepair() { if cfg.EnableRepair() {
file.Link = "repair" file.Link = "repair"