Mount downloads directory

This commit is contained in:
Ben Sarmiento
2024-01-08 22:56:10 +01:00
parent 96e41d6cbc
commit 5a23d0ff7b
6 changed files with 145 additions and 62 deletions

View File

@@ -2,20 +2,8 @@ package realdebrid
import (
"net/http"
"strings"
)
func (rd *RealDebrid) UnrestrictUntilOk(link string, serveFromRclone bool) *Download {
if !strings.HasPrefix(link, "http") {
return nil
}
resp, err := rd.UnrestrictLink(link, serveFromRclone)
if err != nil {
return nil
}
return resp
}
func (rd *RealDebrid) CanFetchFirstByte(url string) bool {
req, err := http.NewRequest("GET", url, nil)
if err != nil {