Simple string sort on listing torrents

This commit is contained in:
Ben Sarmiento
2023-12-12 00:38:17 +01:00
parent ed903c8943
commit 2a1bc59300
6 changed files with 26 additions and 28 deletions

View File

@@ -68,7 +68,10 @@ func NewHTTPClient(token string, maxRetries int, timeoutSecs int, cfg config.Con
if cfg.ShouldForceIPv6() {
dialer := &net.Dialer{}
dialContext := func(ctx context.Context, network, address string) (net.Conn, error) {
host, port, _ := net.SplitHostPort(address)
host, port, err := net.SplitHostPort(address)
if err != nil {
return nil, err
}
if ipv6Address, ok := client.ipv6.Get(address); ok {
return dialer.DialContext(ctx, network, ipv6Address)
}

View File

@@ -9,11 +9,11 @@ func (rd *RealDebrid) UnrestrictUntilOk(link string, serveFromRclone bool) *Down
if !strings.HasPrefix(link, "http") {
return nil
}
resp, _ := rd.UnrestrictLink(link, serveFromRclone)
if resp != nil {
return resp
resp, err := rd.UnrestrictLink(link, serveFromRclone)
if err != nil {
return nil
}
return nil
return resp
}
func (rd *RealDebrid) CanFetchFirstByte(url string) bool {