Skip to content

feat(mappings): per-user default quality profiles - #140

Open
kylepitcock wants to merge 3 commits into
openVESSL:devfrom
kylepitcock:feat/per-user-quality
Open

kylepitcock wants to merge 3 commits into
openVESSL:devfrom
kylepitcock:feat/per-user-quality

Conversation

@kylepitcock

Copy link
Copy Markdown

Summary

  • Each user mapping can now have a default Radarr (movie) and Sonarr (TV) quality profile, chosen from dropdowns in the User Mappings tab. Selecting a value saves immediately; Default clears it.
  • Requests from that user use their profile unless /request specifies quality: explicitly (the explicit option always wins). Applies to instant /request and to the Request button from /search.
  • Profile values use the existing profileId|serverId|type format, so a profile also sets its server, same as the /request quality option.
  • Stored on the mapping in config.json as qualityProfiles: { movie, tv }. Re-saving a mapping (e.g. the automatic metadata refresh) now preserves it.

Changes

  • routes/userMappingRoutes.js: GET /api/quality-profiles (uses the configured Seerr) and PUT /api/user-mappings/:discordUserId/quality-profiles (validates the format and that movie→radarr, tv→sonarr).
  • bot/botUtils.js: withUserQuality() fills in the user's default when none was given.
  • bot/interactions.js: uses it in the instant request and request-button paths.
  • web/script.js, web/style.css: dropdowns in the mapping rows.

Notes

  • Seerr only receives profileId/serverId when auto-approve is on (existing behaviour in sendRequest), so the profile has no effect with auto-approve off.
  • Dropdowns appear only when Seerr is configured and returns profiles.
  • Only syntax-checked (node --check); not tested against a live Seerr/Radarr/Sonarr.

🤖 Generated with Claude Code

@retardgerman
retardgerman changed the base branch from main to dev October 23, 2026 15:27
kylepitcock and others added 2 commits October 23, 2026 13:22
Each user mapping can now have a default Radarr (movie) and Sonarr (TV)
quality profile, chosen from dropdowns in the user mappings tab. Requests
from that user use it unless /request specifies a quality explicitly.
Re-saving a mapping preserves its profiles.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@retardgerman

Copy link
Copy Markdown
Contributor

Nice feature, one bug to fix:

Anime routing is bypassed. withUserQuality() sets options.quality, which parseQualityAndServerOptions() treats as an explicit choice. That skips DEFAULT_QUALITY_ANIME* and DEFAULT_SERVER_ANIME*, so a user with a TV default who requests an anime show ends up on the regular Sonarr instead of the anime one. The user default should only apply when the item isn't anime (or only when no anime default is configured), and an explicit /request quality: should still win over everything.

Smaller points:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants