Add configs
This commit is contained in:
@@ -266,7 +266,6 @@ func (rd *RealDebrid) GetActiveTorrentCount() (*ActiveTorrentCountResponse, erro
|
||||
}
|
||||
|
||||
func (rd *RealDebrid) UnrestrictLink(link string, checkFirstByte bool) (*Download, error) {
|
||||
fmt.Println("Unrestricting link via api", link)
|
||||
data := url.Values{}
|
||||
data.Set("link", link)
|
||||
|
||||
@@ -304,7 +303,7 @@ func (rd *RealDebrid) UnrestrictLink(link string, checkFirstByte bool) (*Downloa
|
||||
return nil, fmt.Errorf("undecodable response so likely it has expired")
|
||||
}
|
||||
|
||||
if checkFirstByte && !rd.canFetchFirstByte(response.Download) {
|
||||
if checkFirstByte && !rd.CanFetchFirstByte(response.Download) {
|
||||
return nil, fmt.Errorf("can't fetch first byte")
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ func (rd *RealDebrid) UnrestrictUntilOk(link string, serveFromRclone bool) *Down
|
||||
return nil
|
||||
}
|
||||
|
||||
func (rd *RealDebrid) canFetchFirstByte(url string) bool {
|
||||
func (rd *RealDebrid) CanFetchFirstByte(url string) bool {
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user