Add job for monitoring bw limit status of tokens
This commit is contained in:
@@ -2,9 +2,13 @@ package utils
|
||||
|
||||
import "github.com/debridmediamanager/zurg/pkg/http"
|
||||
|
||||
func IsBWLimitExceeded(err error) bool {
|
||||
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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user