Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalHDRTag ¶ added in v1.15.0
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
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
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
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
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.