Skip to content

feat(override-rules): Added year filter and instance type switching#1865

Closed
laitco wants to merge 4 commits intoseerr-team:developfrom
laitco:feature-override-rule-year-and-instance-type
Closed

feat(override-rules): Added year filter and instance type switching#1865
laitco wants to merge 4 commits intoseerr-team:developfrom
laitco:feature-override-rule-year-and-instance-type

Conversation

@laitco
Copy link

@laitco laitco commented Aug 21, 2025

This PR was written primarily by Claude Code and ChatGPT Codex CLI.

Description

Added configurable years filter with ranges and service switching functionality to override rules. Years filter supports individual years and ranges (e.g. "2010-2025") with dynamic current year. Service switching provides three modes: force4k, forceStandard, and auto to automatically switch between 4K and non-4K services based on conditions. Implemented smart deletion logic that handles service switching scenarios by checking both external service ID fields and connecting to the correct Radarr/Sonarr instance. Fixed external service ID storage to use actual service type rather than original request type. Enhanced MediaRequestSubscriber to properly track external service IDs when service switching occurs.

BREAKING CHANGE: New database fields, migrations and request handling.

Screenshot (if UI-related)

Overview:
image

Year filter:
image

Instance type switch:
image

To-Dos

  • Successful build pnpm build
  • Translation keys pnpm i18n:extract (ENG -> done, all other languages will follow if code is ok)
  • Database migration (if required)

Issues Fixed or Closed

…th override rules

Added configurable years filter with ranges and service switching functionality to override rules.
Years filter supports individual years and ranges (e.g. "2010-2025") with dynamic current year.
Service switching provides three modes: force4k, forceStandard, and auto to automatically switch
between 4K and non-4K services based on conditions. Implemented smart deletion logic that handles
service switching scenarios by checking both external service ID fields and connecting to the
correct Radarr/Sonarr instance. Fixed external service ID storage to use actual service type rather
than original request type. Enhanced MediaRequestSubscriber to properly track external service IDs
when service switching occurs.

BREAKING CHANGE: New database fields, migrations and request handling.

Fixes #1555 #1560
@LaurenceBarnes
Copy link

for the record, this would also render the PR #1522 obsolete

@github-actions github-actions bot added the merge conflict Cannot merge due to merge conflicts label Oct 12, 2025
@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

@laitco laitco requested a review from a team as a code owner October 12, 2025 17:07
@github-actions github-actions bot removed the merge conflict Cannot merge due to merge conflicts label Oct 12, 2025
@zwimer
Copy link

zwimer commented Oct 14, 2025

for the record, this would also render the PR #1522 obsolete

As override rules are ignored for auto-approved requests, I do not thing it would. It'd be very weird to have only half your users have their anime send to the anime Sonarr instance, but all admin's / trusted users with the auto_approve permission have their anime sent to the TV Sonarr instance.

See #1195

The thing to note is, override rules will not be applied to admins/auto_approve permission users.

@laitco
Copy link
Author

laitco commented Oct 14, 2025

for the record, this would also render the PR #1522 obsolete

As override rules are ignored for auto-approved requests, I do not thing it would. It'd be very weird to have only half your users have their anime send to the anime Sonarr instance, but all admin's / trusted users with the auto_approve permission have their anime sent to the TV Sonarr instance.

See #1195

The thing to note is, override rules will not be applied to admins/auto_approve permission users.

Maybe an option within the override rules section/general tab is needed to apply the override rules as well for the auto approved ones. Could this help? Should be possible to implement the override rule logic beforehand the request is automaticlly approved.

@fallenbagel
Copy link
Collaborator

fallenbagel commented Oct 14, 2025

for the record, this would also render the PR #1522 obsolete

As override rules are ignored for auto-approved requests, I do not thing it would. It'd be very weird to have only half your users have their anime send to the anime Sonarr instance, but all admin's / trusted users with the auto_approve permission have their anime sent to the TV Sonarr instance.

See #1195

The thing to note is, override rules will not be applied to admins/auto_approve permission users.

No. If you read the thread the following message clears up that i misspoke. And explains that it only does not apply to advanced request users NOT AUTO_APPROVE permission users.

@fallenbagel
Copy link
Collaborator

for the record, this would also render the PR #1522 obsolete

As override rules are ignored for auto-approved requests, I do not thing it would. It'd be very weird to have only half your users have their anime send to the anime Sonarr instance, but all admin's / trusted users with the auto_approve permission have their anime sent to the TV Sonarr instance.
See #1195

The thing to note is, override rules will not be applied to admins/auto_approve permission users.

Maybe an option within the override rules section/general tab is needed to apply the override rules as well for the auto approved ones. Could this help? Should be possible to implement the override rule logic beforehand the request is automaticlly approved.

Override rules already apply for auto approved requests.

@laitco
Copy link
Author

laitco commented Oct 14, 2025

for the record, this would also render the PR #1522 obsolete

As override rules are ignored for auto-approved requests, I do not thing it would. It'd be very weird to have only half your users have their anime send to the anime Sonarr instance, but all admin's / trusted users with the auto_approve permission have their anime sent to the TV Sonarr instance.
See #1195

The thing to note is, override rules will not be applied to admins/auto_approve permission users.

Maybe an option within the override rules section/general tab is needed to apply the override rules as well for the auto approved ones. Could this help? Should be possible to implement the override rule logic beforehand the request is automaticlly approved.

Override rules already apply for auto approved requests.

Thanks for clarification. I think I remember on my testings some weeks ago before creating PR that it worked for these users.

@zwimer
Copy link

zwimer commented Oct 15, 2025

No. If you read the thread the following message clears up that i misspoke. And explains that it only does not apply to advanced request users NOT AUTO_APPROVE permission users.

Ah, thanks for the clarification. In that case I'm still don't think it renders #1522 obsolete as there is still a subset of users who would be unable to have their requests be sent to the Anime Sonarr compared to the default TV Sonarr (for example). Though if there is a way to have it apply to said users, then that's a different story.

@fallenbagel
Copy link
Collaborator

No. If you read the thread the following message clears up that i misspoke. And explains that it only does not apply to advanced request users NOT AUTO_APPROVE permission users.

Ah, thanks for the clarification. In that case I'm still don't think it renders #1522 obsolete as there is still a subset of users who would be unable to have their requests be sent to the Anime Sonarr compared to the default TV Sonarr (for example). Though if there is a way to have it apply to said users, then that's a different story.

#1522 (comment)

@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

@github-actions github-actions bot added the merge conflict Cannot merge due to merge conflicts label Oct 28, 2025
@github-actions github-actions bot removed the merge conflict Cannot merge due to merge conflicts label Oct 28, 2025
Copy link
Collaborator

@fallenbagel fallenbagel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are override rules handling the switch to 4k instances. We already have that handled separately through the Request 4k button and permissions, which gives the user the freedom to choose between 4k or standard.

If a user explicitly clicks Request 4K, they should get 4K. Why would an override rule change that explicit choice?

Instance switching should work like this:

  • Normal requests → only follow rules for normal services.
  • 4K requests → only follow rules for 4K services.
  • Override rules should not be overriding the user's explicit choice (if seerr is configured to allow 4K requesting and the user is given the 4K request permission)

This PR seems to introduce significant complexity to override the user’s intent, which feels unnecessary. What's the use case that justifies this?

Wdyt? @seerr-team/seerr-core

@0xSysR3ll
Copy link
Contributor

This PR seems to introduce significant complexity to override the user’s intent, which feels unnecessary. What's the use case that justifies this?

Wdyt? @seerr-team/seerr-core

Agreed. This PR seems to introduce a bit too much complex refactoring. It should only implement the year filter - as service type switching is IMO not something we want.

@fallenbagel
Copy link
Collaborator

This PR seems to introduce significant complexity to override the user’s intent, which feels unnecessary. What's the use case that justifies this?

Wdyt? @seerr-team/seerr-core

Agreed. This PR seems to introduce a bit too much complex refactoring. It should only implement the year filter - as service type switching is IMO not something we want.

Instance switching is something we do want though. Though I would say it would be better to split the two prs. One for year. One for instance switching (not the same as instance type switching)

@laitco
Copy link
Author

laitco commented Nov 2, 2025

PR would be redone within 2 PRs:

  • Year Filter
  • Instance Switching

ETA: tba

@laitco laitco closed this Nov 2, 2025
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.

more override rules

5 participants