Cache for directories and torrents
This commit is contained in:
@@ -97,7 +97,7 @@ func (gf *GetFile) HandleGetRequest(w http.ResponseWriter, r *http.Request, t *i
|
||||
file.Link = "repair"
|
||||
if c.EnableRepair() {
|
||||
// log.Debugf("File %s is marked for repair", filepath.Base(file.Path))
|
||||
t.SetNewLatestState(intTor.EmptyState()) // force a recheck
|
||||
t.ScheduleForRefresh() // force a recheck
|
||||
}
|
||||
http.Error(w, "File is not available", http.StatusNotFound)
|
||||
return
|
||||
@@ -181,7 +181,7 @@ func (gf *GetFile) streamFileToResponse(file *intTor.File, url string, w http.Re
|
||||
file.Link = "repair"
|
||||
if cfg.EnableRepair() {
|
||||
// log.Debugf("File %s is marked for repair", filepath.Base(file.Path))
|
||||
torMgr.SetNewLatestState(intTor.EmptyState()) // force a recheck
|
||||
torMgr.ScheduleForRefresh() // force a recheck
|
||||
}
|
||||
}
|
||||
http.Error(w, "File is not available", http.StatusNotFound)
|
||||
@@ -195,7 +195,7 @@ func (gf *GetFile) streamFileToResponse(file *intTor.File, url string, w http.Re
|
||||
file.Link = "repair"
|
||||
if cfg.EnableRepair() {
|
||||
// log.Debugf("File %s is marked for repair", filepath.Base(file.Path))
|
||||
torMgr.SetNewLatestState(intTor.EmptyState()) // force a recheck
|
||||
torMgr.ScheduleForRefresh() // force a recheck
|
||||
}
|
||||
}
|
||||
http.Error(w, "File is not available", http.StatusNotFound)
|
||||
|
||||
Reference in New Issue
Block a user