Documentation
¶
Overview ¶
Package parser reads release names: title, year, season and episode, resolution, source, codec and group.
Package parser extracts structured metadata from release filenames, using PTN-style logic as a base. It works by repeatedly matching and stripping known tokens (season/episode, quality, codec, group, edition, proper/repack) from the raw name; whatever is left before the first stripped token is the title candidate.
This does not import github.com/rdborg/mediarium/internal/download (or any other module) — the project's package-boundary rule keeps the parser usable standalone.
Index ¶
Constants ¶
const English = "English"
English is the name Languages uses for English, the language a release with no language tag is assumed to be in.
Variables ¶
This section is empty.
Functions ¶
func IsPreRelease ¶
IsPreRelease reports whether a source is a cinema recording or screener rather than a proper release.
func LanguageNames ¶
func LanguageNames() []string
LanguageNames lists every language a release tag can name, English first and the rest alphabetically.
Types ¶
type Release ¶
type Release struct {
Title string
Year int
Season int // 0 = not a TV release
Episode int // 0 = season pack / not episode-specific
Episodes []int // populated for multi-episode releases (e.g. E01E02)
Resolution string
Source string // WEB-DL, WEBRip, BluRay, REMUX, HDTV, DVDRip, CAM, ...
Codec string // x264, x265, XviD, ...
AudioCodec string // AAC, AC3, DTS, TrueHD, Atmos, ...
HDR string // HDR10, HDR10+, DV
Edition string // Extended, Director's Cut, Unrated, IMAX, ...
Group string
Proper bool
Repack bool
Is3D bool
// Languages are the audio languages the release name tags (English,
// Italian...), each once. Empty means untagged, which is usually English.
Languages []string
// Multi is set when the release says it holds several audio languages
// (MULTI, DUAL, or DL after a language).
Multi bool
// Subbed is set for releases tagged with subtitles (VOSTFR, SUBBED...).
Subbed bool
}
Release is the structured result of parsing a release filename. Season/ Episode fields are zero for movie releases; they exist now (rather than being added in Phase 2) so the same struct serves both without a rework.