Allow "is not" on activity queue custom filters#8517
Allow "is not" on activity queue custom filters#8517naxhh wants to merge 1 commit intoSonarr:v5-developfrom
Conversation
| { | ||
| key: 'notEqual', | ||
| value: () => translate('FilterIsNot'), | ||
| }, |
There was a problem hiding this comment.
Why not just change the type in the series filter instead of making exact the same as equal?
Sonarr/frontend/src/Activity/Queue/useQueue.ts
Lines 40 to 43 in 5bde924
There was a problem hiding this comment.
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.
So changing the filter type won't do anything unless you alter the API as well.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
| { | ||
| key: 'notEqual', | ||
| value: () => translate('FilterIsNot'), | ||
| }, |
There was a problem hiding this comment.
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.
So changing the filter type won't do anything unless you alter the API as well.
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
Issues Fixed or Closed by this PR
Couldn't find any existing related to this.