Catch bw limit errors and prevent repair loops

This commit is contained in:
Ben Adrian Sarmiento
2024-06-24 00:38:57 +02:00
parent a0c13af94b
commit 449c0f71cf
5 changed files with 139 additions and 83 deletions

View File

@@ -113,8 +113,11 @@ func (rd *RealDebrid) UnrestrictLink(link string, verifyDownloadURL bool) (*Down
}
// will only check for first byte if serving from rclone
if verifyDownloadURL && !rd.downloadClient.VerifyURL(response.Download) {
return nil, fmt.Errorf("download URL verification failed: %s", response.Download)
if verifyDownloadURL {
err := rd.downloadClient.VerifyURL(response.Download)
if err != nil {
return nil, err
}
}
// rd.log.Debugf("Unrestricted link %s into %s", link, response.Download)