Repair enqueque

This commit is contained in:
Ben Adrian Sarmiento
2024-06-17 23:48:21 +02:00
parent ad06d8fea3
commit d53ba8c973
5 changed files with 137 additions and 102 deletions

View File

@@ -69,7 +69,7 @@ func (dl *Downloader) DownloadFile(
http.Error(resp, "File is stale, please try again", http.StatusLocked)
return
}
torMgr.TriggerRepair(torrent)
torMgr.EnqueueForRepair(torrent)
http.Error(resp, "File is not available", http.StatusNotFound)
return
} else {
@@ -155,7 +155,7 @@ func (dl *Downloader) streamFileToResponse(
http.Error(resp, "File is stale, please try again", http.StatusLocked)
return
}
torMgr.TriggerRepair(torrent)
torMgr.EnqueueForRepair(torrent)
}
http.Error(resp, "File is not available", http.StatusNotFound)
return
@@ -171,7 +171,7 @@ func (dl *Downloader) streamFileToResponse(
http.Error(resp, "File is stale, please try again", http.StatusLocked)
return
}
torMgr.TriggerRepair(torrent)
torMgr.EnqueueForRepair(torrent)
}
http.Error(resp, "File is not available", http.StatusNotFound)
return