Skip to content

feat(stremio): configure Prowlarr indexers for addon searches - #791

Merged
javi11 merged 1 commit into
mainfrom
session/prowlarr-indexer-config-a716ab
Jul 23, 2026
Merged

feat(stremio): configure Prowlarr indexers for addon searches#791
javi11 merged 1 commit into
mainfrom
session/prowlarr-indexer-config-a716ab

Conversation

@javi11

@javi11 javi11 commented Jul 22, 2026

Copy link
Copy Markdown
Owner

What

Adds the ability to configure which Prowlarr indexers the Stremio addon searches. Indexers are selected by name — fetched live from Prowlarr — rather than by typing opaque numeric IDs. Leaving the selection empty searches all indexers (current behavior).

Why

The Stremio integration previously searched every Prowlarr indexer with no way to scope it. Users with many indexers (or a mix of fast/slow or region-specific ones) want to limit searches to a curated subset for speed and result quality.

Changes

Backend

  • internal/config/manager.go — new ProwlarrConfig.Indexers []int field (empty = all indexers).
  • internal/prowlarr/client.go — new Indexer type and GetIndexers(ctx) (returns usenet indexers only, sorted by name); indexers threaded through Search / SearchByTVDB / searchWithID into SearchInput.IndexerIDs.
  • internal/api/stremio_addon_handlers.go — new handleListProwlarrIndexers. Accepts optional {host, api_key} in the body so the UI can list indexers before settings are saved, falling back to saved config.
  • internal/api/server.go — registered POST /api/prowlarr/indexers (JWT-protected).
  • internal/api/types.goIndexers exposed in ProwlarrAPIResponse so the UI reflects the saved selection.

Frontend

  • frontend/src/types/config.tsindexers?: number[] on ProwlarrConfig plus a ProwlarrIndexer type.
  • frontend/src/components/config/StremioConfigSection.tsx — new "Indexers" fieldset with a Load from Prowlarr button, a scrollable checkbox list (name + "disabled" badge for inactive indexers), a selected count, and error handling.

Reviewer notes

  • Torrent indexers are intentionally omitted from GetIndexers since AltMount only queues usenet releases.
  • The config PATCH path wraps the payload as { stremio: { prowlarr: { indexers: [...] } } }, so the new field round-trips through BodyParser with no extra merge logic.
  • No unit tests added — internal/prowlarr currently has no test file. Happy to add coverage for GetIndexers / the indexer-ID plumbing if desired.

Verification

  • go build ./internal/... ✅ · go vet
  • bun run check (biome) ✅ · npx tsc --noEmit ✅ · bun run build

Let users restrict the Stremio addon's Prowlarr searches to specific
indexers, selected by name rather than opaque numeric IDs.

- config: add ProwlarrConfig.Indexers ([]int); empty = search all
- prowlarr: add Indexer type + GetIndexers (usenet only, sorted by name)
  and thread indexer IDs through Search/SearchByTVDB into SearchInput
- api: add POST /api/prowlarr/indexers to list indexers (accepts host/
  api_key overrides so the UI can list before settings are saved) and
  expose indexers in ProwlarrAPIResponse
- frontend: add an "Indexers" picker in StremioConfigSection with a
  "Load from Prowlarr" button and checkbox selection
@javi11
javi11 merged commit 49ece04 into main Jul 23, 2026
2 checks passed
@javi11
javi11 deleted the session/prowlarr-indexer-config-a716ab branch July 23, 2026 17:35
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.

1 participant