Add token management
This commit is contained in:
10
pkg/utils/bwlimit.go
Normal file
10
pkg/utils/bwlimit.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package utils
|
||||
|
||||
import "github.com/debridmediamanager/zurg/pkg/http"
|
||||
|
||||
func IsBWLimitExceeded(err error) bool {
|
||||
if dlErr, ok := err.(*http.DownloadErrorResponse); ok && dlErr.Message == "bytes_limit_reached" {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user