Skip to content

Add Sportarr backend (/request sport) - #19

Open
Sportarr wants to merge 2 commits into
activexray:mainfrom
Sportarr:sportarr-backend
Open

Add Sportarr backend (/request sport)#19
Sportarr wants to merge 2 commits into
activexray:mainfrom
Sportarr:sportarr-backend

Conversation

@Sportarr

@Sportarr Sportarr commented Aug 5, 2026

Copy link
Copy Markdown

Closes #17.

I build Sportarr (https://github.com/Sportarr/Sportarr), the sports event
manager the issue asks about. This adds it as a first-class backend with a
/request sport command: users search the league catalog, pick a league,
optionally pick a quality profile, and the league is added monitored so new
events grab as they air.

Design notes, following the existing provider shapes:

  • New sportarr_api crate: Sportarr publishes no OpenAPI document, so
    unlike the generated sonarr/radarr/seerr crates this is a small
    hand-written subset (league catalog search, library list, quality
    profiles, root folders, add league) in the same apis/models layout.
  • providers/sportarr.rs implements the MediaBackend trait. Search
    cross-references the library so an already-monitored league early-stops
    with the standard "already requested" flow; a league that exists but is
    deliberately unmonitored gets a user-facing message pointing at Sportarr
    instead of silently re-monitoring it.
  • The only Discord-side decision is the quality profile (pinnable via
    quality_profile in config, exactly like the other backends). Root
    folder and monitoring scope follow Sportarr's own defaults, sports
    libraries hang those off root-folder bindings rather than per-request
    picks.
  • Config: [backends.config.Sportarr] variant + starter template +
    config.example.toml section.

Testing: cargo build/test/clippy(-D warnings)/fmt all clean across the
workspace. Live-verified against a real Sportarr instance at the provider
level: catalog search, dedupe against the library, quality profile listing,
and a real league add, with duplicate adds answered cleanly.

AI Disclosure: This PR was written with AI assistance. I reviewed the full diff and live-tested it against a real Sportarr instance.

Live testing against a real Sportarr caught two bugs: the search path
used form encoding, turning spaces into plus signs the server takes
literally (multi-word searches silently returned nothing), and the add
model expected the created entity while Sportarr answers with a
confirmation envelope (message, leagueId, monitored). Percent-encode the
path segment like seerr_api does and model the envelope.
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.

Sportarr support

1 participant