Add Sportarr backend (/request sport) - #19
Open
Sportarr wants to merge 2 commits into
Open
Conversation
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.
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.
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 sportcommand: 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:
sportarr_apicrate: Sportarr publishes no OpenAPI document, sounlike 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.rsimplements the MediaBackend trait. Searchcross-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.
quality_profilein config, exactly like the other backends). Rootfolder and monitoring scope follow Sportarr's own defaults, sports
libraries hang those off root-folder bindings rather than per-request
picks.
[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.