Documentation
¶
Overview ¶
Package arrsvc composes the github.com/cplieger/arrapi Sonarr and Radarr clients with subflux's subtitle-specific operations: "wanted" iteration (which library items need a subtitle search), exclude-tag name resolution, and a fire-and-forget rescan. The raw library reads, per-item lookups, history polling, and connectivity ping are promoted from the embedded arrapi client unchanged, so this package adds only the app-level behavior arrapi deliberately does not provide.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Radarr ¶
Radarr composes arrapi.Radarr with subflux's wanted-movie iteration, exclude-tag resolution, and error-only rescan.
func (*Radarr) GetWantedMovies ¶
func (r *Radarr) GetWantedMovies(ctx context.Context, excludeTagIDs map[int]struct{}, fn func(arrapi.Movie) error) error
GetWantedMovies invokes fn for every movie that needs a subtitle search. It fetches the full movie list first (closing that connection), then iterates locally, skipping movies with an excluded tag or no file.
func (*Radarr) RescanMovie ¶
RescanMovie asks Radarr to rescan the movie's folder for new or changed files. Fire-and-forget, like RescanSeries.
type Sonarr ¶
Sonarr composes arrapi.Sonarr with subflux's wanted-episode iteration, exclude-tag resolution, and error-only rescan.
func (*Sonarr) GetWantedEpisodes ¶
func (s *Sonarr) GetWantedEpisodes(ctx context.Context, excludeTagIDs map[int]struct{}, fn func(arrapi.Series, arrapi.Episode) error) error
GetWantedEpisodes invokes fn for every episode that needs a subtitle search. It fetches the full series list first (closing that connection), then fetches each non-excluded series' episodes concurrently (bounded to 6 goroutines), then invokes fn sequentially. A series whose episode fetch keeps failing is logged and skipped rather than aborting the whole scan.
func (*Sonarr) RescanSeries ¶
RescanSeries asks Sonarr to rescan the series' folder for new or changed files (subflux calls this after writing a subtitle). It is fire-and-forget: arrapi returns the queued command, which subflux does not poll, so only the error is surfaced.
func (*Sonarr) ResolveExcludeTagIDs ¶
func (s *Sonarr) ResolveExcludeTagIDs(ctx context.Context, names []string, logMissing bool) map[int]struct{}
ResolveExcludeTagIDs returns the arr tag IDs matching the given tag names. When logMissing is true, names with no matching tag are logged once at INFO (coverage passes false to avoid repeating the message on every page load).