releaseparse

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package releaseparse parses scene and P2P release names into core.ReleaseInfo. It is pure string work and safe for concurrent use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EpisodeMatches

func EpisodeMatches(parsed core.ReleaseInfo, season, episode int) bool

EpisodeMatches reports whether parsed info is exactly the wanted episode (not a season pack, season matches, episode is listed).

func HasUsableInfo

func HasUsableInfo(info core.ReleaseInfo) bool

HasUsableInfo reports whether parsed info carries enough technical detail to consider a release whose title cannot be verified.

func IsObfuscated

func IsObfuscated(title string) bool

IsObfuscated reports whether a name/title looks like a hash or random string with no readable words.

func NormalizeEdition

func NormalizeEdition(name string) string

NormalizeEdition maps an edition label found in a release name (or an already-normalized one) to the canonical cut name, "" when there is no explicit cut. Two releases belong to the same cut when their normalized editions match.

func NormalizeTitle

func NormalizeTitle(s string) string

NormalizeTitle lowercases, strips diacritics and punctuation, expands "&" to "and", and drops a leading article, for title comparisons.

func Parse

func Parse(name string) core.ReleaseInfo

Parse extracts structured info from a release name.

func ParseEdition

func ParseEdition(name string) string

ParseEdition identifies explicit cut labels without guessing from runtime.

func TitleMatches

func TitleMatches(parsed core.ReleaseInfo, want string) bool

TitleMatches reports whether a parsed release title matches the wanted title.

func TitleYearMatches

func TitleYearMatches(parsed core.ReleaseInfo, want string, wantYear int) bool

TitleYearMatches is TitleMatches plus a year check with ±1 tolerance. A zero year on either side skips the year check.

func TitlesMatch

func TitlesMatch(a, b string) bool

TitlesMatch reports whether two raw titles are the same after normalisation.

func YearMatches

func YearMatches(got, want int) bool

YearMatches reports whether two years agree within ±1 (zero = unknown).

Types

This section is empty.

Jump to

Keyboard shortcuts

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