feat(stremio): configure Prowlarr indexers for addon searches - #791
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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— newProwlarrConfig.Indexers []intfield (empty = all indexers).internal/prowlarr/client.go— newIndexertype andGetIndexers(ctx)(returns usenet indexers only, sorted by name);indexersthreaded throughSearch/SearchByTVDB/searchWithIDintoSearchInput.IndexerIDs.internal/api/stremio_addon_handlers.go— newhandleListProwlarrIndexers. 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— registeredPOST /api/prowlarr/indexers(JWT-protected).internal/api/types.go—Indexersexposed inProwlarrAPIResponseso the UI reflects the saved selection.Frontend
frontend/src/types/config.ts—indexers?: number[]onProwlarrConfigplus aProwlarrIndexertype.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
GetIndexerssince AltMount only queues usenet releases.{ stremio: { prowlarr: { indexers: [...] } } }, so the new field round-trips throughBodyParserwith no extra merge logic.internal/prowlarrcurrently has no test file. Happy to add coverage forGetIndexers/ the indexer-ID plumbing if desired.Verification
go build ./internal/...✅ ·go vet✅bun run check(biome) ✅ ·npx tsc --noEmit✅ ·bun run build✅