Check if host works first before assigning random host

This commit is contained in:
Ben Sarmiento
2024-01-27 00:27:28 +01:00
parent 49b524ada6
commit 4bb0234d8f
4 changed files with 32 additions and 36 deletions

View File

@@ -308,7 +308,7 @@ func (rd *RealDebrid) UnrestrictLink(link string, checkFirstByte bool) (*Downloa
return nil, fmt.Errorf("undecodable response: %v", err)
}
if checkFirstByte && !rd.CanFetchFirstByte(response.Download) {
if checkFirstByte && !rd.client.CanFetchFirstByte(response.Download) {
return nil, fmt.Errorf("can't fetch first byte")
}