From 02d900971ddabca073793ab0d25b7a87a71ce27c Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Sat, 17 Feb 2024 15:07:31 +0100 Subject: [PATCH] Use download client properly when fetching first byte --- internal/config/types.go | 1 - pkg/http/client.go | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/config/types.go b/internal/config/types.go index 448804a..3f3375f 100644 --- a/internal/config/types.go +++ b/internal/config/types.go @@ -60,7 +60,6 @@ type ZurgConfig struct { RetriesUntilFailed int `yaml:"retries_until_failed" json:"retries_until_failed"` ServeFromRclone bool `yaml:"serve_from_rclone" json:"serve_from_rclone"` Username string `yaml:"username" json:"username"` - VerifyDownloadLink bool `yaml:"verify_download_link" json:"verify_download_link"` } func (z *ZurgConfig) GetConfig() ZurgConfig { diff --git a/pkg/http/client.go b/pkg/http/client.go index 671df61..1cf6e18 100644 --- a/pkg/http/client.go +++ b/pkg/http/client.go @@ -295,7 +295,8 @@ func (r *HTTPClient) CanFetchFirstByte(url string) bool { } req.Header.Set("Range", "bytes=0-0") req = req.WithContext(ctx) - resp, err := r.client.Do(req) + + resp, err := r.Do(req) if err != nil { return false }