Delete in progress fixers

This commit is contained in:
Ben Sarmiento
2024-02-05 12:59:55 +01:00
parent eb9d91f8de
commit 58332a354b
4 changed files with 11 additions and 11 deletions

View File

@@ -176,6 +176,9 @@ func (r *HTTPClient) Do(req *http.Request) (*http.Response, error) {
break
}
}
if err != nil && strings.Contains(err.Error(), "timeout") && req.Host == "api.real-debrid.com" && !strings.HasSuffix(req.URL.Path, "unrestrict/link") {
r.log.Warnf("Adjust your API timeout settings, request to %s timed out", req.URL.String())
}
return resp, err
}
@@ -249,9 +252,6 @@ func (r *HTTPClient) shouldRetry(resp *http.Response, reqHasRangeHeader bool, er
}
}
if err != nil && strings.Contains(err.Error(), "timeout") {
if resp.Request.URL.Host == "api.real-debrid.com" && !strings.Contains(resp.Request.URL.Path, "unrestrict/") {
r.log.Warnf("Request timed out, adjust the timeout value in the config")
}
return 1
}
if resp != nil {

View File

@@ -86,7 +86,7 @@ type TorrentInfo struct {
Files []File `json:"files"`
}
func (i *TorrentInfo) IsDone() bool {
func (i *TorrentInfo) IsComplete() bool {
selectedCount := 0
for _, file := range i.Files {
if file.Selected == 1 {