polishing
This commit is contained in:
@@ -39,6 +39,10 @@ func HandlePropfindRequest(w http.ResponseWriter, r *http.Request, t *torrent.To
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "cannot find") {
|
||||
http.Error(w, "Not Found", http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
log.Errorf("Error processing request: %v", err)
|
||||
http.Error(w, "Server error", http.StatusInternalServerError)
|
||||
return
|
||||
|
||||
@@ -34,8 +34,11 @@ func HandleDirectoryListing(w http.ResponseWriter, r *http.Request, t *torrent.T
|
||||
http.Error(w, "Not Found", http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "cannot find") {
|
||||
http.Error(w, "Not Found", http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
log.Errorf("Error processing request: %v", err)
|
||||
http.Error(w, "Server error", http.StatusInternalServerError)
|
||||
return
|
||||
|
||||
@@ -59,7 +59,7 @@ func NewHTTPClient(token string, maxRetries int, c config.ConfigInterface) *HTTP
|
||||
// no need to retry
|
||||
return false
|
||||
},
|
||||
log: logutil.NewLogger().Named("http"),
|
||||
log: logutil.NewLogger().Named("client"),
|
||||
config: c,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ func (rd *RealDebrid) SelectTorrentFiles(id string, files string) error {
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
rd.log.Debugf("Selected files %d for torrent id=%s", len(strings.Split(files, ",")), id)
|
||||
rd.log.Debugf("Started the download for torrent id=%s", len(strings.Split(files, ",")), id)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user