Documentation
¶
Overview ¶
Package subtitleext is the single authority for which file extensions count as subtitle files, exposed as capability-scoped views rather than one flat union. Every accept path (archive extraction, on-disk scanning) and the delete gate consume the same table, so accept and delete can never disagree about what a subtitle file is.
Capability views:
- ArchiveInput: extensions accepted when extracting subtitle content from provider archives (ZIP/RAR members).
- OnDisk: extensions recognized as standalone subtitle files beside media files during library scans.
- WriterOutput: extensions subflux itself writes (every writer emits .srt today; see subtitlefile.ExtSRT).
- Delete: the union view — anything an accept path could have produced or recognized must be deletable through the subtitle delete gate.
Seed evidence (2026-07-18 inventory): the table is the union of the two constants it replaced — the on-disk set (.srt .ass .ssa .sub) and the archive set (adds .vtt). .idx/.smi/.sami/.txt are deliberately NOT seeded: no writer produces them and no reader recognizes them; admission requires positive inventory evidence, and .idx/.sub pairing would need explicit two-file delete semantics first.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArchiveInput ¶
ArchiveInput reports whether ext (an extension or a path) is accepted as subtitle content when extracting from provider archives.
func Delete ¶
Delete reports whether ext (an extension or a path) carries the delete capability: the union of every accept view, since anything an accept path could have produced or recognized must be deletable.
func Extensions ¶
func Extensions() []string
Extensions returns every extension in the table, sorted, for coverage tests and consumers that need to enumerate a view via the predicates.
func OnDisk ¶
OnDisk reports whether ext (an extension or a path) is recognized as a standalone subtitle file on disk during library scans.
func WriterOutput ¶
WriterOutput reports whether ext (an extension or a path) is an extension subflux's own writers emit.
Reached only by tests today, and kept deliberately: the writerOutput capability IS used in production, by Delete's union below, and these four accessors are one per capability. Dropping the view whose callers happen to be absent would leave an asymmetric vocabulary that the next writer path re-adds.
Types ¶
This section is empty.