parser

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 ParseEdition

func ParseEdition(title string) string

ParseEdition is a convenience function that returns only the edition name. Returns empty string if no edition is detected.

func ParseQuality

func ParseQuality(title string) plugin.Quality

ParseQuality is a convenience function that returns only the plugin.Quality portion of a full parse. Drop-in replacement for quality.Parse().

func ParseReleaseGroup

func ParseReleaseGroup(title string) string

ParseReleaseGroup is a convenience function that returns only the release group. Drop-in replacement for quality.ParseReleaseGroup().

func ParseTitle

func ParseTitle(name string) (title string, year int)

ParseTitle is a convenience function that returns only the title and year. Drop-in replacement for movie.ParseFilename().

Types

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

	// 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.

type Revision

type Revision struct {
	Version int  // 1 = original, 2 = PROPER/REPACK, 3 = PROPER2, etc.
	IsReal  bool // REAL tag present
}

Revision tracks PROPER/REPACK/REAL status.

Jump to

Keyboard shortcuts

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