Documentation
¶
Overview ¶
providers.go is the single registration point for all subtitle providers. Each provider's factory function, settings schema and credential-check capability are registered here; adding a new provider requires one entry in providerEntries. No init(), no blank imports, no global state.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
bundle
command
Command bundle builds subflux's browser client: it bundles the SSE worker and the two page entrypoints (app.ts, login.ts) with esbuild (a Go library — no Node, no npm, per the fleet's no-Node-in-the-builder doctrine), assembles the CSS bundles from the manifest files, copies @cplieger/ui-primitives' base stylesheet.
|
Command bundle builds subflux's browser client: it bundles the SSE worker and the two page entrypoints (app.ts, login.ts) with esbuild (a Go library — no Node, no npm, per the fleet's no-Node-in-the-builder doctrine), assembles the CSS bundles from the manifest files, copies @cplieger/ui-primitives' base stylesheet. |
|
wire-codegen
command
Command wire-codegen generates the TypeScript wire surface and the Go path constants from the single wire contract in internal/wirespec, using the wiregen library (AST-based; github.com/cplieger/wiregen/v3).
|
Command wire-codegen generates the TypeScript wire surface and the Go path constants from the single wire contract in internal/wirespec, using the wiregen library (AST-based; github.com/cplieger/wiregen/v3). |
|
internal
|
|
|
arrsvc
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.
|
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. |
|
authstore
Package authstore is subflux's bbolt-backed implementation of the auth library's persistence SPI.
|
Package authstore is subflux's bbolt-backed implementation of the auth library's persistence SPI. |
|
authstore/authstoretest
Package authstoretest provides a shared, engine-agnostic behavioral contract suite for subflux's auth store against the auth library's persistence SPI.
|
Package authstoretest provides a shared, engine-agnostic behavioral contract suite for subflux's auth store against the auth library's persistence SPI. |
|
boltstore
Package boltstore is the bbolt-backed core store for subflux's search, subtitle, scan, sync-offset, and poll domains.
|
Package boltstore is the bbolt-backed core store for subflux's search, subtitle, scan, sync-offset, and poll domains. |
|
cache
Package cache provides a generic TTL cache with singleflight coalescing.
|
Package cache provides a generic TTL cache with singleflight coalescing. |
|
cliparse
Package cliparse implements subflux's flat CLI grammar: a single ParseAndValidate pass that splits "--key value" / "--key=value" tokens, rejects unknown flags (with typo suggestions) and stray positionals, parses bool flags from the spec table, validates typed values, enforces required flags, and applies spec defaults.
|
Package cliparse implements subflux's flat CLI grammar: a single ParseAndValidate pass that splits "--key value" / "--key=value" tokens, rejects unknown flags (with typo suggestions) and stray positionals, parses bool flags from the spec table, validates typed values, enforces required flags, and applies spec defaults. |
|
config
Package config loads, validates, and hot-reloads the subflux YAML configuration.
|
Package config loads, validates, and hot-reloads the subflux YAML configuration. |
|
config/defaults
Package defaults provides the shared configuration default values and validation thresholds used by both config/ and config/schema/.
|
Package defaults provides the shared configuration default values and validation thresholds used by both config/ and config/schema/. |
|
config/schema
Package schema generates the UI configuration schema for the web frontend.
|
Package schema generates the UI configuration schema for the web frontend. |
|
embedded
Package embedded detects embedded subtitle tracks in video files.
|
Package embedded detects embedded subtitle tracks in video files. |
|
epmarker
Package epmarker is the single authority for reading episode markers out of release names and archive member filenames.
|
Package epmarker is the single authority for reading episode markers out of release names and archive member filenames. |
|
httpapi
Package httpapi is the handler plumbing of subflux's own HTTP API: the prelude every handler opens with and the envelope every handler answers in.
|
Package httpapi is the handler plumbing of subflux's own HTTP API: the prelude every handler opens with and the envelope every handler answers in. |
|
httpwire
Package httpwire holds subflux's own HTTP wire policy: the byte bounds it will read from a peer, and the vocabulary it classifies a peer's response with.
|
Package httpwire holds subflux's own HTTP wire policy: the byte bounds it will read from a peer, and the vocabulary it classifies a peer's response with. |
|
langcode
Package langcode maps any language identifier subflux meets — a provider payload, an ffprobe stream tag, an arr API response, a config file — onto the one internal code space, and is the only place that mapping happens.
|
Package langcode maps any language identifier subflux meets — a provider payload, an ffprobe stream tag, an arr API response, a config file — onto the one internal code space, and is the only place that mapping happens. |
|
logsafe
Package logsafe binds runesafe's single-line preset to Subflux's log surface, so every untrusted string reaches slog through one policy.
|
Package logsafe binds runesafe's single-line preset to Subflux's log surface, so every untrusted string reaches slog through one policy. |
|
mediaid
Package mediaid builds the stable identifier subflux addresses one media item by: "tmdb-27205" for a movie, "tvdb-121361-s01e09" for an episode, plus the prefixes that select a whole season or series in one scan.
|
Package mediaid builds the stable identifier subflux addresses one media item by: "tmdb-27205" for a movie, "tvdb-121361-s01e09" for an episode, plus the prefixes that select a whole season or series in one scan. |
|
obs
Package obs owns Subflux's observability surface: the Prometheus registry (exposition prefix "subflux_") and every counter, gauge and histogram it serves — searches, downloads, imports, scans, the HTTP transport, and the bbolt store.
|
Package obs owns Subflux's observability surface: the Prometheus registry (exposition prefix "subflux_") and every counter, gauge and histogram it serves — searches, downloads, imports, scans, the HTTP transport, and the bbolt store. |
|
provider
Package provider contains the provider registry and retry wrappers.
|
Package provider contains the provider registry and retry wrappers. |
|
provider/anidb
Package anidb provides TVDB → AniDB mapping using the community-maintained anime-list.xml from https://github.com/Anime-Lists/anime-lists.
|
Package anidb provides TVDB → AniDB mapping using the community-maintained anime-list.xml from https://github.com/Anime-Lists/anime-lists. |
|
provider/animetosho
Package animetosho implements the AnimeTosho subtitle provider.
|
Package animetosho implements the AnimeTosho subtitle provider. |
|
provider/archive
Package archive extracts a subtitle from a ZIP or RAR container.
|
Package archive extracts a subtitle from a ZIP or RAR container. |
|
provider/betaseries
Package betaseries implements the BetaSeries subtitle provider.
|
Package betaseries implements the BetaSeries subtitle provider. |
|
provider/classify
Package classify provides subtitle classification (forced/HI) and language resolution utilities consumed by provider sub-packages.
|
Package classify provides subtitle classification (forced/HI) and language resolution utilities consumed by provider sub-packages. |
|
provider/gestdown
Package gestdown implements the Gestdown subtitle provider.
|
Package gestdown implements the Gestdown subtitle provider. |
|
provider/hdbits
Package hdbits implements the HDBits.org subtitle provider.
|
Package hdbits implements the HDBits.org subtitle provider. |
|
provider/opensubtitles
Package opensubtitles implements the OpenSubtitles.com REST API provider.
|
Package opensubtitles implements the OpenSubtitles.com REST API provider. |
|
provider/subdl
Package subdl implements the SubDL subtitle provider.
|
Package subdl implements the SubDL subtitle provider. |
|
provider/subsource
Package subsource implements the SubSource subtitle provider.
|
Package subsource implements the SubSource subtitle provider. |
|
provider/synthetic
Package synthetic provides a subtitle provider that answers from generated data instead of an upstream service.
|
Package synthetic provides a subtitle provider that answers from generated data instead of an upstream service. |
|
provider/yifysubtitles
Package yifysubtitles implements the YIFY Subtitles provider.
|
Package yifysubtitles implements the YIFY Subtitles provider. |
|
rpid
Package rpid derives and validates the WebAuthn relying-party ID for the host subflux is reached on: the registrable domain (eTLD+1) from the public suffix list, never a label strip, so a host whose provider is itself a public suffix (foo.duckdns.org, nas.synology.me) collapses to the exact host instead of to an illegal bare suffix.
|
Package rpid derives and validates the WebAuthn relying-party ID for the host subflux is reached on: the registrable domain (eTLD+1) from the public suffix list, never a label strip, so a host whose provider is itself a public suffix (foo.duckdns.org, nas.synology.me) collapses to the exact host instead of to an illegal bare suffix. |
|
scorer
Package scorer holds the CONFIGURED scoring engine: it carries the user's weight table and answers the two questions callers outside the search domain ask, what does this subtitle score and which tier is that score.
|
Package scorer holds the CONFIGURED scoring engine: it carries the user's weight table and answers the two questions callers outside the search domain ask, what does this subtitle score and which tier is that score. |
|
search
Package search implements the subtitle search engine.
|
Package search implements the subtitle search engine. |
|
search/providerhealth
Package providerhealth tracks how a provider is behaving and takes a failing one out of rotation: it counts failures in a sliding window and, past a threshold, times the provider out for a cooldown.
|
Package providerhealth tracks how a provider is behaving and takes a failing one out of rotation: it counts failures in a sliding window and, past a threshold, times the provider out for a cooldown. |
|
search/release
Package release provides release name parsing via PCRE-compatible regex patterns sourced from TRaSH Guides and Sonarr/Radarr QualityParser.
|
Package release provides release name parsing via PCRE-compatible regex patterns sourced from TRaSH Guides and Sonarr/Radarr QualityParser. |
|
search/scoring
Package scoring holds the pure matching and weighting rules the scan engine applies to a candidate: which subtitles identify as the requested item, which weight categories a release hits, and the title and episode comparisons under both.
|
Package scoring holds the pure matching and weighting rules the scan engine applies to a candidate: which subtitles identify as the requested item, which weight categories a release hits, and the title and episode comparisons under both. |
|
search/syncing
Package syncing provides subtitle timing synchronization for the search engine.
|
Package syncing provides subtitle timing synchronization for the search engine. |
|
server
Package server — Content-Security-Policy construction.
|
Package server — Content-Security-Policy construction. |
|
server/activity
Package activity provides concurrent-safe activity and alert tracking for the subflux UI status indicator.
|
Package activity provides concurrent-safe activity and alert tracking for the subflux UI status indicator. |
|
server/activityhandlers
Package activityhandlers serves the activity log, the alert list, and the SSE event stream with its digest and presence-acknowledgement routes: the HTTP surface over the in-memory registries that record what the server is doing and what went wrong.
|
Package activityhandlers serves the activity log, the alert list, and the SSE event stream with its digest and presence-acknowledgement routes: the HTTP surface over the in-memory registries that record what the server is doing and what went wrong. |
|
server/adminsocket
Package adminsocket serves the out-of-band admin plane: the one route the CLI posts to for password reset and API-key generation.
|
Package adminsocket serves the out-of-band admin plane: the one route the CLI posts to for password reset and API-key generation. |
|
server/authhandlers
Package authhandlers provides shared types and utilities for the server's authentication handler cluster: login, WebAuthn, OIDC, admin user management, and security management (password change, API keys, passkeys).
|
Package authhandlers provides shared types and utilities for the server's authentication handler cluster: login, WebAuthn, OIDC, admin user management, and security management (password change, API keys, passkeys). |
|
server/confighandlers
Package confighandlers provides HTTP handlers for configuration CRUD operations: get, save, reset, schema, and path validation.
|
Package confighandlers provides HTTP handlers for configuration CRUD operations: get, save, reset, schema, and path validation. |
|
server/coverage
Package coverage provides pure computation functions for subtitle coverage analysis.
|
Package coverage provides pure computation functions for subtitle coverage analysis. |
|
server/coveragehandlers
Package coveragehandlers provides HTTP handlers for the /api/coverage/* endpoints.
|
Package coveragehandlers provides HTTP handlers for the /api/coverage/* endpoints. |
|
server/events
Package events is subflux's typed server-sent-events layer: the sealed Event/EventData types the app publishes, marshaled onto the shared cplieger/sse broadcast hub.
|
Package events is subflux's typed server-sent-events layer: the sealed Event/EventData types the app publishes, marshaled onto the shared cplieger/sse broadcast hub. |
|
server/filehandlers
Package filehandlers provides HTTP handlers for the /api/files/* endpoints.
|
Package filehandlers provides HTTP handlers for the /api/files/* endpoints. |
|
server/manualops
Package manualops implements the business logic for manual subtitle search and download operations.
|
Package manualops implements the business logic for manual subtitle search and download operations. |
|
server/mediahandlers
Package mediahandlers provides HTTP handlers for the /api/media/* endpoints.
|
Package mediahandlers provides HTTP handlers for the /api/media/* endpoints. |
|
server/polling
Package polling provides the history-polling subsystem for Sonarr/Radarr import events and the write-through poll timestamp cache.
|
Package polling provides the history-polling subsystem for Sonarr/Radarr import events and the write-through poll timestamp cache. |
|
server/previewhandlers
Package previewhandlers provides HTTP handlers for the video/subtitle preview and poster proxy endpoints.
|
Package previewhandlers provides HTTP handlers for the video/subtitle preview and poster proxy endpoints. |
|
server/queryhandlers
Package queryhandlers provides read-only HTTP query handlers: subtitle state, backoff, manual locks, providers, parsed config, score simulation, and dashboard stats.
|
Package queryhandlers provides read-only HTTP query handlers: subtitle state, backoff, manual locks, providers, parsed config, score simulation, and dashboard stats. |
|
server/resolve
Package resolve is the one home for typed-reference resolution (S7): it maps the wire references — FileRef (one stored subtitle file) and MediaRef (the arr-known video of a media item) — to absolute filesystem paths using server-derived facts only.
|
Package resolve is the one home for typed-reference resolution (S7): it maps the wire references — FileRef (one stored subtitle file) and MediaRef (the arr-known video of a media item) — to absolute filesystem paths using server-derived facts only. |
|
server/scanning
Package scanning implements the full-scan orchestration engine.
|
Package scanning implements the full-scan orchestration engine. |
|
server/scheduler
Package scheduler provides the periodic full-scan pipeline, DB maintenance, and auth cleanup scheduling for the subflux server.
|
Package scheduler provides the periodic full-scan pipeline, DB maintenance, and auth cleanup scheduling for the subflux server. |
|
server/showskip
Package showskip provides a TTL-based cache for show-level subtitle pre-check results.
|
Package showskip provides a TTL-based cache for show-level subtitle pre-check results. |
|
server/storeops
Package storeops runs the periodic operations that treat the bbolt file as an operational artifact rather than a set of rows: timestamped snapshots with retention pruning, and the file-size and freelist gauges.
|
Package storeops runs the periodic operations that treat the bbolt file as an operational artifact rather than a set of rows: timestamped snapshots with retention pruning, and the file-size and freelist gauges. |
|
server/synchandlers
Package synchandlers provides HTTP handlers for subtitle sync operations (audio-based sync and manual offset adjustment).
|
Package synchandlers provides HTTP handlers for subtitle sync operations (audio-based sync and manual offset adjustment). |
|
server/syncjobs
Package syncjobs owns the server-side async sync job machinery (D1, D2): a bounded FIFO dispatcher with an admission lease, the job record registry GET /api/sync/jobs serves, and the sync:done publication seam.
|
Package syncjobs owns the server-side async sync job machinery (D1, D2): a bounded FIFO dispatcher with an admission lease, the job record registry GET /api/sync/jobs serves, and the sync:done publication seam. |
|
store/buckets
Package buckets is the single owner of the AUTH-domain bbolt bucket names shared by the two packages that operate on one database file: the core store (internal/boltstore) bootstraps every bucket in its schema, and the auth store (internal/authstore) builds keys inside these.
|
Package buckets is the single owner of the AUTH-domain bbolt bucket names shared by the two packages that operate on one database file: the core store (internal/boltstore) bootstraps every bucket in its schema, and the auth store (internal/authstore) builds keys inside these. |
|
store/kv
Package kv holds the shared bbolt store primitives used by both the core subflux store (internal/store) and the auth store (internal/authstore).
|
Package kv holds the shared bbolt store primitives used by both the core subflux store (internal/store) and the auth store (internal/authstore). |
|
store/storetest
Package storetest provides a shared, engine-agnostic behavioral contract suite for the core subtitle store.
|
Package storetest provides a shared, engine-agnostic behavioral contract suite for the core subtitle store. |
|
subflux
Package subflux is the application's wire and domain type vocabulary.
|
Package subflux is the application's wire and domain type vocabulary. |
|
subsync
Package subsync provides subtitle timing synchronization.
|
Package subsync provides subtitle timing synchronization. |
|
subsync/crosslang
Package crosslang implements cross-language subtitle alignment using anchor-based matching and dynamic programming.
|
Package crosslang implements cross-language subtitle alignment using anchor-based matching and dynamic programming. |
|
subsync/ffmpeg
Package ffmpeg provides low-level ffmpeg/ffprobe subprocess wrappers for stream probing, subtitle extraction, and PCM audio extraction.
|
Package ffmpeg provides low-level ffmpeg/ffprobe subprocess wrappers for stream probing, subtitle extraction, and PCM audio extraction. |
|
subsync/fft
Package fft provides a radix-2 Cooley-Tukey FFT implementation for cross-correlation in the subsync package.
|
Package fft provides a radix-2 Cooley-Tukey FFT implementation for cross-correlation in the subsync package. |
|
subsync/framerate
Package framerate provides framerate drift detection for subtitle alignment.
|
Package framerate provides framerate drift detection for subtitle alignment. |
|
subtitleenc
Package subtitleenc is the single authority for what encoding a subtitle's bytes are in and how to read them as UTF-8.
|
Package subtitleenc is the single authority for what encoding a subtitle's bytes are in and how to read them as UTF-8. |
|
subtitleext
Package subtitleext is the single authority for which file extensions count as subtitle files, exposed as capability-scoped views rather than one flat union.
|
Package subtitleext is the single authority for which file extensions count as subtitle files, exposed as capability-scoped views rather than one flat union. |
|
subtitlefile
Package subtitlefile owns the subtitle file on disk: what subflux names it, and what it will accept as its contents.
|
Package subtitlefile owns the subtitle file on disk: what subflux names it, and what it will accept as its contents. |
|
syncworker
Package syncworker isolates subtitle-sync computation in a supervised one-shot child process (P13).
|
Package syncworker isolates subtitle-sync computation in a supervised one-shot child process (P13). |
|
testsupport
Package testsupport provides shared test helpers used across multiple packages.
|
Package testsupport provides shared test helpers used across multiple packages. |
|
wirespec
Package wirespec is the single source of truth for subflux's HTTP wire contract: the registered wire types, enums, and the endpoint table that cmd/wire-codegen feeds into wiregen to emit the TS types, decoders, typed client, and the Go path constants (internal/apipaths).
|
Package wirespec is the single source of truth for subflux's HTTP wire contract: the registered wire types, enums, and the endpoint table that cmd/wire-codegen feeds into wiregen to emit the TS types, decoders, typed client, and the Go path constants (internal/apipaths). |
|
wiring
Package wiring holds composition-root types that connect concrete implementations across the config, provider, scorer, search and embedded packages.
|
Package wiring holds composition-root types that connect concrete implementations across the config, provider, scorer, search and embedded packages. |
Click to show internal directories.
Click to hide internal directories.