Jackett icon indicating copy to clipboard operation
Jackett copied to clipboard

api: filter indexers by state

Open mynameisbogdan opened this issue 1 year ago • 7 comments

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

mynameisbogdan avatar Aug 20 '24 19:08 mynameisbogdan

Um, how is this different from the existing status:{healthy|failing|unknown} https://github.com/Jackett/Jackett?tab=readme-ov-file#filter-indexers ?

garfield69 avatar Aug 20 '24 19:08 garfield69

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

mynameisbogdan avatar Aug 20 '24 19:08 mynameisbogdan

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

mynameisbogdan avatar Aug 20 '24 19:08 mynameisbogdan

yea, but let me check tomorrow what's the thing with StatusFilterFunc.

mynameisbogdan avatar Aug 20 '24 19:08 mynameisbogdan

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

garfield69 avatar Aug 20 '24 20:08 garfield69

Right, that must be because of StringEnumConverter since I wanted to see the string values and not the integer ones.

mynameisbogdan avatar Aug 20 '24 20:08 mynameisbogdan

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.

garfield69 avatar Aug 21 '24 08:08 garfield69