-
-
Notifications
You must be signed in to change notification settings - Fork 567
feat: add TMDB rating-based auto-approval system for requests #4148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat: add TMDB rating-based auto-approval system for requests #4148
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a TMDB rating-based auto-approval system that automatically approves or declines media requests based on configurable rating thresholds. Key changes include additions to the user settings interfaces and database schema for rating thresholds, updates to Formik validation and UI components for permissions/rating settings, and new server-side logic to evaluate approval status based on TMDB ratings.
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/hooks/useUser.ts | Added new optional numeric properties for rating thresholds. |
| src/components/UserProfile/UserSettings/UserPermissions/index.tsx | Updated Formik schema and component state to include TMDB rating fields and validations. |
| src/components/UserProfile/UserSettings/UserGeneralSettings/index.tsx | Adjusted user settings form fields and translations regarding rating settings. |
| src/components/Settings/SettingsUsers/index.tsx | Included rating thresholds in default settings with Yup validation. |
| src/components/RatingSettingsTable/index.tsx | New component to render rating input fields with validation. |
| src/components/PermissionOption & PermissionEdit | Passed Formik state (values, errors, touched, setFieldValue) for rating settings controls. |
| server/utils/autoApprovalRatings.ts | Implemented rating-based auto-approval logic using TMDB ratings and user settings. |
| server/routes/user/usersettings.ts, server/lib/settings.ts, server/interfaces/api/userSettingsInterfaces.ts, server/entity/UserSettings.ts | Updated to support new rating threshold fields. |
| server/entity/MediaRequest.ts | Modified request creation to use new auto-approval status determined by ratings. |
| server/index.ts | Added type casts for middleware to satisfy TypeScript. |
src/components/UserProfile/UserSettings/UserPermissions/index.tsx
Outdated
Show resolved
Hide resolved
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Description
Adds a comprehensive TMDB rating-based auto-approval system that allows users to automatically approve or decline media requests based on configurable rating thresholds.
Key Features:
Auto-approve requests above specified TMDB rating minimums
Auto-decline requests below specified TMDB rating maximums
Granular control with separate settings for:
Permission integration - rating tables appear contextually under auto-approve permission checkboxes
User-specific settings configurable in both individual user permissions and default permissions
Screenshot (if UI-related)
Users > {user} > Permissions
Settings > Users > Default Permissions
4K Example