Additional fixes on link checks
This commit is contained in:
@@ -70,7 +70,7 @@ func HandleGetRequest(w http.ResponseWriter, r *http.Request, t *intTor.TorrentM
|
||||
return
|
||||
}
|
||||
|
||||
if file.Link == "" {
|
||||
if !strings.HasPrefix(file.Link, "http") {
|
||||
// This is a dead file, serve an alternate file
|
||||
log.Warnf("File %s is not yet available, zurg is repairing the torrent", filename)
|
||||
streamErrorVideo("https://www.youtube.com/watch?v=bGTqwt6vdcY", w, r, t, c, log)
|
||||
|
||||
@@ -62,7 +62,7 @@ func HandleHeadRequest(w http.ResponseWriter, r *http.Request, t *torrent.Torren
|
||||
http.Error(w, "Cannot find file", http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
if file.Link == "" {
|
||||
if !strings.HasPrefix(file.Link, "http") {
|
||||
// This is a dead file, serve an alternate file
|
||||
log.Warnf("File %s is no longer available", filename)
|
||||
http.Error(w, "Cannot find file", http.StatusNotFound)
|
||||
|
||||
Reference in New Issue
Block a user