releases

package
v1.23.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalHDRTag added in v1.15.0

func CanonicalHDRTag(tag string) string

CanonicalHDRTag maps an HDR tag string to its canonical form. For example, "HDR10P", "HDR10PLUS", and "HDR10+" all map to "HDR10+".

func JoinNormalizedCodecSlice added in v1.14.0

func JoinNormalizedCodecSlice(slice []string) string

JoinNormalizedCodecSlice converts a codec slice to a normalized string for comparison. Applies codec aliasing so that x264, H.264, H264, and AVC are treated as equivalent.

func NormalizeHDRTags added in v1.15.0

func NormalizeHDRTags(tags []string) []string

NormalizeHDRTags deduplicates and canonicalizes a slice of HDR tag strings. HDR10 is subsumed by HDR10+ when both are present. Returns nil for empty input.

func NormalizeSource added in v1.14.0

func NormalizeSource(source string) string

NormalizeSource converts a source string to its canonical form. Returns the original (uppercased) string if no alias mapping exists.

func NormalizeVideoCodec added in v1.14.0

func NormalizeVideoCodec(codec string) string

NormalizeVideoCodec converts a video codec string to its canonical form. Returns the original (uppercased) string if no alias mapping exists.

Types

type ContentTypeInfo added in v1.14.0

type ContentTypeInfo struct {
	// ContentType is one of: movie, tv, music, audiobook, book, comic, game, app, adult, unknown.
	ContentType string
	// MediaType is an optional detected media format (e.g. "cd", "dvd-video", "bluray").
	MediaType string
}

ContentTypeInfo contains all information about a torrent's detected content type.

func DetermineContentType added in v1.14.0

func DetermineContentType(release *rls.Release) ContentTypeInfo

DetermineContentType analyzes a parsed release and returns a best-effort content type.

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser caches rls parsing results so we do not repeatedly parse the same release names.

func NewDefaultParser

func NewDefaultParser() *Parser

NewDefaultParser returns a parser using the default TTL.

func NewParser

func NewParser(ttl time.Duration) *Parser

NewParser returns a parser with the provided TTL for cached entries.

func (*Parser) Clear

func (p *Parser) Clear(name string)

Clear removes a cached entry.

func (*Parser) Parse

func (p *Parser) Parse(name string) *rls.Release

Parse returns the parsed release metadata for name.

Jump to

Keyboard shortcuts

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