Fix possible issues
This commit is contained in:
@@ -48,7 +48,11 @@ func (dl *Downloader) DownloadFile(directory, torrentName, fileName string, resp
|
||||
|
||||
// log.Debugf("Opening file %s from torrent %s (%s)", fileName, torMgr.GetKey(torrent), file.Link)
|
||||
if file.IsBroken {
|
||||
http.Error(resp, "File is not available", http.StatusInternalServerError)
|
||||
if cfg.EnableRepair() {
|
||||
http.Error(resp, "File is temporarily unavailable", http.StatusInternalServerError)
|
||||
} else {
|
||||
http.Error(resp, "File is not available", http.StatusNotFound)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user