subtitleext

package
v0.1.164 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2026 License: GPL-2.0, GPL-3.0 Imports: 3 Imported by: 0

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 api.SubtitleExtSRT).
  • 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, formerly api.SubtitleExtsOnDisk) and the archive set (adds .vtt, formerly archive.SubtitleExts). .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

func ArchiveInput(ext string) bool

ArchiveInput reports whether ext (an extension or a path) is accepted as subtitle content when extracting from provider archives.

func Delete

func Delete(ext string) bool

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

func OnDisk(ext string) bool

OnDisk reports whether ext (an extension or a path) is recognized as a standalone subtitle file on disk during library scans.

func WriterOutput

func WriterOutput(ext string) bool

WriterOutput reports whether ext (an extension or a path) is an extension subflux's own writers emit.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL