Skip to content

Conversation

@andrewmooreio
Copy link

@andrewmooreio andrewmooreio commented May 24, 2025

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:

    • Movies vs TV shows
    • HD vs 4K quality
  • Permission integration - rating tables appear contextually under auto-approve permission checkboxes

  • User-specific settings configurable in both individual user permissions and default permissions

Note: I'm primarily a Python developer, so please go easy on me with TypeScript/React best practices! 🐍➡️🟦 Feedback and suggestions are very welcome!

Screenshot (if UI-related)

Users > {user} > Permissions
image
Settings > Users > Default Permissions
image
4K Example
image

Copilot AI review requested due to automatic review settings May 24, 2025 17:48
Copy link

Copilot AI left a 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.

@andrewmooreio andrewmooreio changed the title Feat/tmdb rating auto approval Add TMDB rating-based auto-approval system for requests May 24, 2025
@andrewmooreio andrewmooreio changed the title Add TMDB rating-based auto-approval system for requests feat: add TMDB rating-based auto-approval system for requests May 24, 2025
@stale
Copy link

stale bot commented Jul 29, 2025

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.

@stale stale bot added the stale label Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant