Files
zurg/pkg/utils/bwlimit.go
2024-06-28 18:55:02 +02:00

15 lines
338 B
Go

package utils
import "github.com/debridmediamanager/zurg/pkg/http"
func IsBytesLimitReached(err error) bool {
if dlErr, ok := err.(*http.DownloadErrorResponse); ok && dlErr.Message == "bytes_limit_reached" {
return true
}
return false
}
func AreAllTokensExpired(err error) bool {
return err.Error() == "all tokens are expired"
}