Skip to content

Allow "is not" on activity queue custom filters#8517

Draft
naxhh wants to merge 1 commit intoSonarr:v5-developfrom
naxhh:patch-1
Draft

Allow "is not" on activity queue custom filters#8517
naxhh wants to merge 1 commit intoSonarr:v5-developfrom
naxhh:patch-1

Conversation

@naxhh
Copy link
Copy Markdown

@naxhh naxhh commented Apr 12, 2026

Description

Allow to use "is not" filter for queue custom filters. FILTER_BUILDER

Now is possible to make a filter that says "status is completed & series is "my favorite one" but is not possible to create one that says "status is completed & series is not "my favorite one".

This should allow for that.
I did a very shallow codebase exploration so if i'm issing something important please let me know.

Screenshots for UI Changes

imagen

Issues Fixed or Closed by this PR

Couldn't find any existing related to this.

Comment on lines +82 to +85
{
key: 'notEqual',
value: () => translate('FilterIsNot'),
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not just change the type in the series filter instead of making exact the same as equal?

name: 'seriesIds',
label: () => translate('Series'),
type: 'equal',
valueType: filterBuilderValueTypes.SERIES,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, the reason it's like this currently is due to having only including support in the endpoint, as it's a server side collection and not a client side one.

private PagingSpec<NzbDrone.Core.Queue.Queue> GetQueue(PagingSpec<NzbDrone.Core.Queue.Queue> pagingSpec, HashSet<int> seriesIds, DownloadProtocol? protocol, HashSet<int> languages, HashSet<int> quality, HashSet<QueueStatus> status, bool includeUnknownSeriesItems)

So changing the filter type won't do anything unless you alter the API as well.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yeah i started pulling from the type but i wasn't sure if there was a reason why should be equals instead of say exact. They seemed to do the same but i'm new to this codebase.

so it would be acceptable to move it to exact and then verify that the QueueController manages this correctly?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

verify that the QueueController manages this correctly?

I just explained my earlier message that it doesn't, it's not a client side filtering but server side so short of adding a new query parameter to exclude series ids I can't see how you're going to implement this functionality.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I understood your point, i was refering to adding support on that endpoint.
Would need to look at it but seems it should be able to support filtering conditions.

If you don't want to invest time in this as a feature just let me know

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@markus101 yay or nay?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it's reasonable idea, but a couple things come to mind:

  • The changes actually need to be tested before opening a PR, or requesting a review now that it's already open
  • You'll need to investigate what other parts of the app will be affected by this and ensure they're also working correctly, which could include both client and server side filtering

Comment on lines +82 to +85
{
key: 'notEqual',
value: () => translate('FilterIsNot'),
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, the reason it's like this currently is due to having only including support in the endpoint, as it's a server side collection and not a client side one.

private PagingSpec<NzbDrone.Core.Queue.Queue> GetQueue(PagingSpec<NzbDrone.Core.Queue.Queue> pagingSpec, HashSet<int> seriesIds, DownloadProtocol? protocol, HashSet<int> languages, HashSet<int> quality, HashSet<QueueStatus> status, bool includeUnknownSeriesItems)

So changing the filter type won't do anything unless you alter the API as well.

@markus101 markus101 marked this pull request as draft April 12, 2026 22:13
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.

3 participants