Documentation
¶
Overview ¶
Package parser implements a comprehensive, unified release name parser. It extracts title, year, video quality, audio, edition, release group, language, and marker information from a single Parse() call.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseTitle ¶
ParseTitle is a public helper that extracts the show/movie title and year from a raw filename or release name.
Types ¶
type EpisodeInfo ¶
type EpisodeInfo struct {
Season int // 0 if not found
Episodes []int // empty if season pack or daily/anime only
AbsoluteEpisode int // for anime absolute numbering
AirDate string // "2024-01-15" for daily shows
IsSeasonPack bool // true if "S01" with no episode number
IsDaily bool
IsAnime bool
}
EpisodeInfo holds parsed season/episode data from a release title.
func ParseEpisodeInfo ¶
func ParseEpisodeInfo(input string) EpisodeInfo
ParseEpisodeInfo extracts TV episode metadata from a raw release title. It tries each format in priority order and returns on the first match.
type Language ¶
type Language string
Language identifies a detected language tag.
const ( LangEnglish Language = "english" LangFrench Language = "french" LangGerman Language = "german" LangSpanish Language = "spanish" LangItalian Language = "italian" LangPortuguese Language = "portuguese" LangRussian Language = "russian" LangJapanese Language = "japanese" LangKorean Language = "korean" LangChinese Language = "chinese" LangHindi Language = "hindi" LangArabic Language = "arabic" LangDutch Language = "dutch" LangNordic Language = "nordic" LangSwedish Language = "swedish" LangDanish Language = "danish" LangFinnish Language = "finnish" LangNorwegian Language = "norwegian" LangPolish Language = "polish" LangTurkish Language = "turkish" LangMulti Language = "multi" )
type ParsedRelease ¶
type ParsedRelease struct {
// Identity
Title string
Year int
ReleaseGroup string
// Episode info (TV-specific)
EpisodeInfo EpisodeInfo
// Video quality
Resolution plugin.Resolution
Source plugin.Source
Codec plugin.Codec
HDR plugin.HDRFormat
// Audio
AudioCodec plugin.AudioCodec
AudioChannels plugin.AudioChannels
// Edition
Edition string // canonical name, e.g. "Director's Cut"
// Languages
Languages []Language
// Revision
Revision Revision
// Markers / Flags
IsHybrid bool
Is3D bool
IsHardcodedSub bool
IsScene bool
IsSample bool
IsInternal bool
IsLimited bool
IsSubbed bool
IsDubbed bool
IsProper bool
IsRepack bool
// Source metadata
RawTitle string // original input before normalization
// Name is the human-readable quality label (e.g. "Bluray-1080p x265 HDR10").
QualityName string
}
ParsedRelease is the comprehensive result of parsing a release name.
func Parse ¶
func Parse(input string) ParsedRelease
Parse extracts all metadata from a release name or filename. It is a pure function with no external dependencies.
func (ParsedRelease) Quality ¶
func (p ParsedRelease) Quality() plugin.Quality
Quality returns the backward-compatible plugin.Quality struct.