api: filter indexers by state
Description
Adding a new query parameter state to /api/v2.0/indexers that allows to filtering indexers by:
- state=all (default)
- state=success
- state=error
Issues Fixed or Closed by this PR
- Fixes #15546
Um, how is this different from the existing status:{healthy|failing|unknown} https://github.com/Jackett/Jackett?tab=readme-ov-file#filter-indexers ?
those work for you? didn't for me.
LE: they seem to apply to /api/v2.0/indexers/<filter>/results/torznab, not /api/v2.0/indexers
http://localhost:9117/api/v2.0/indexers?configured=true&status=success doesn't filter out not working indexers for me.
Same for healthy or failing according to https://github.com/Jackett/Jackett/blob/b9c3f593da2cfda8db35563299b467a80106e2b2/src/Jackett.Common/Utils/FilterFuncs/StatusFilterFunc.cs#L9-L10
yea, but let me check tomorrow what's the thing with StatusFilterFunc.
ok. Also when using 0.20.496 (this PR) I am seeing strange result on the dashboard, with the proxy warning being highlighted because the disabled option is not shown, even when I select disabled and save, %-/ It does not happen when I go back to 0.20.490
Right, that must be because of StringEnumConverter since I wanted to see the string values and not the integer ones.
You're right, the status filter is only valid for the /api/v2.0/indexers/<filter>/results/torznab command, and using it as a parm on a http://localhost:9117/api/v2.0/indexers/ just gets ignored.
Besides, status= is not status: as described in the filter readme.
So don't waste time looking further into the status.
Just sort out the StringEnumConverter screwing with the dashboard, and implement as you first intended.