- Add request domain, repository, service, and reconcile task - Add Radarr/Sonarr fulfillment adapters and TMDB discovery - Expose user and admin request APIs with quota and approval rules - Add web UI for browsing, requesting, and admin queue management - Migration 139 introduces media_requests and related tables
31 lines
857 B
Go
31 lines
857 B
Go
package requests
|
|
|
|
import "errors"
|
|
|
|
var (
|
|
ErrInvalidMediaType = errors.New("invalid media type")
|
|
ErrInvalidInput = errors.New("invalid request input")
|
|
ErrRequestsDisabled = errors.New("requests are disabled")
|
|
ErrUserBlocked = errors.New("user is blocked from requesting")
|
|
ErrQuotaExceeded = errors.New("request quota exceeded")
|
|
ErrAlreadyAvailable = errors.New("media is already available")
|
|
ErrAlreadyRequested = errors.New("media is already requested")
|
|
ErrNotFound = errors.New("request not found")
|
|
ErrForbidden = errors.New("request forbidden")
|
|
ErrInvalidState = errors.New("invalid request state")
|
|
)
|
|
|
|
type QuotaError struct {
|
|
Used int
|
|
Limit int
|
|
WindowDays int
|
|
}
|
|
|
|
func (e QuotaError) Error() string {
|
|
return ErrQuotaExceeded.Error()
|
|
}
|
|
|
|
func (e QuotaError) Unwrap() error {
|
|
return ErrQuotaExceeded
|
|
}
|